using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
class Program
{
static void Main(string[] args)
{
p1001 p = new p1001();
}
}
class RTIO
{
static string bufferStr = "";
public static int GetInt()
{
if (bufferStr.Length == 0)
{
bufferStr = Console.ReadLine();
}
int index = bufferStr.IndexOf(' ');
if (index < 0) index = bufferStr.Length;
int res = int.Parse(bufferStr.Substring(0, index));
if (index != bufferStr.Length)
{
bufferStr = bufferStr.Remove(0, index + 1);
}
return res;
}
}
class p1001
{
public p1001()
{
int x = RTIO.GetInt();
Console.WriteLine((x + 1) * (Math.Abs(x - 1) + 1) / 2);
}
}
Sunday, August 10, 2008
ural1068
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment