int N = Convert.ToInt32(Console.ReadLine()); int a = 0; if (N > 1) { a = N * (N + 1) / 2; } else { for (int i = 1; i <= N; ++i) { a += i; } } Console.WriteLine(a);