You are given an integer N. Consider all possible segments on the coordinate axis with endpoints at integer points with coordinates between 0 and N, inclusive; there will be $\frac{n(n + 1)}{2}$ of them.

You want to draw these segments in several layers so that in each layer the segments don't overlap (they might touch at the endpoints though). You can not move the segments to a different location on the coordinate axis. 

Find the minimal number of layers you have to use for the given N.


-----Input-----

The only input line contains a single integer N (1 ≤ N ≤ 100).


-----Output-----

Output a single integer - the minimal number of layers required to draw the segments for the given N.


-----Examples-----
Input
2

Output
2

Input
3

Output
4

Input
4

Output
6



-----Note-----

As an example, here are the segments and their optimal arrangement into layers for N = 4. [Image]

Difficulty: EASY
Tags: Mathematics

Constructive algorithms
Expected Time Complexity: O(N)

Starter code:

Solutions:
a = int(input())
b = a // 2
ans = b * (b + 1)
if a % 2 == 1:
	ans += b + 1
print(ans)


n = int(input())
e = int(n / 2)
if n % 2 == 0:
	print(e * (e + 1))
else:
	print(e * (e + 1) + int((n + 1) / 2))


n = int(input())
blocks = []
for block in reversed(range(1, n + 1)):
	for count in range(n - block + 1):
		blocks.append([block, count + 1, False])
iteration = used = 0
while used < len(blocks):
	block_len = n
	shift = 0
	for index in range(len(blocks)):
		if not blocks[index][2] and blocks[index][0] <= block_len and (blocks[index][1] >= shift):
			block_len -= blocks[index][0]
			blocks[index][2] = True
			shift = blocks[index][0] + blocks[index][1]
			used += 1
	iteration += 1
print(iteration)


n = int(input())
print(max(((i + 1) * (n - i) for i in range(n))))


from collections import Counter, deque

def lInt(d=None):
	return map(int, input().split(d))
(n, *_) = lInt()
ans = 0
for l in range(1, n + 1):
	for j in range(0, l):
		if j + l <= n:
			ans += 1
print(ans)


n = int(input())
a = (n + 1) // 2
b = (n + 2) // 2
print(a * b)


import sys
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except Exception as es:
	pass
import math
n = int(input())
print((n // 2 + 1) * math.ceil(n / 2))


n = int(input())
prev = 1
if n == 1:
	print(1)
	exit()
cur = 2
for i in range(3, n + 1):
	now = (i * (i + 1) // 2 - (i - 1) * (i - 2) // 2 + 1) // 2 + prev
	(prev, cur) = (cur, now)
print(cur)


n = int(input())
if n == 1:
	print(1)
	exit(0)
s = 2
h = n // 2
cur = n - 1
while cur > h:
	s += n - cur + 1
	cur -= 1
while cur > 1:
	s += cur
	cur -= 1
print(s)


n = int(input())
cnt = 0
while n > 0:
	cnt += n
	n -= 2
print(cnt)


num = int(input().strip())
segment = []
for i in range(1, num + 1):
	j = 0
	for j in range(num):
		if j + i <= num:
			segment.append((j, j + i))
segment.sort(key=lambda x: (x[0], [1]))
layer_count = 0
while segment != []:
	rightend = segment[0][1]
	segment.remove(segment[0])
	j = 0
	while j < len(segment):
		if rightend == segment[j][0]:
			rightend = segment[j][1]
			segment.remove(segment[j])
		else:
			j += 1
	layer_count += 1
print(layer_count)


n = int(input()) + 1
print(n * n // 4)


n = int(input())
ans = 0
for i in range(1, n + 1):
	ans += min(n - i + 1, i)
print(ans)


n = int(input())
if n % 2 == 0:
	ans = n // 2 * (n // 2 + 1)
else:
	ans = (n // 2 + 1) * (n // 2 + 1)
print(ans)


n = int(input())
memo = dict()

def f(n):
	if n == 1:
		return 1
	if n == 2:
		return 2
	if n in memo:
		return memo[n]
	memo[n] = n + f(n - 2)
	return memo[n]
print(f(n))


a = [1, 2]
n = int(input())
for i in range(n - 2):
	a.append(a[i] + i + 3)
print(a[n - 1])


n = int(input())
(l, r) = (0, n)
ans = 0
while l < r:
	ans += r - l
	l += 1
	r -= 1
print(ans)


x = int(input())
print(int((x + 2 - x % 2) * (x + x % 2) / 4))


def getans(n):
	if n == 2:
		return 2
	if n == 1:
		return 1
	return n + getans(n - 2)
print(getans(int(input())))


n = int(input())
l = [[False] * n]
for s in range(n):
	for e in range(s + 1, n + 1):
		for x in range(len(l)):
			if True not in l[x][s:e]:
				l[x][s:e] = [True] * (e - s)
				break
		else:
			l.append([False] * n)
			l[-1][s:e] = [True] * (e - s)
print(len(l))


n = int(input())
l = (n + 1) // 2
r = (n + 2) // 2
print(l * r)


def main():
	n = int(input())
	print(((n - 1 >> 1) + 1) * (n - (n + 1 >> 1) + 1))
try:
	while True:
		main()
except EOFError:
	pass


print(sum((i for i in range(int(input()), -1, -2))))


num = int(input().strip())
segments = []
for i in range(1, num + 1):
	for j in range(num):
		if j + i > num:
			break
		segments.append((j, j + i))
segments.sort(key=lambda x: (x[0], x[1]))
count = 0
while segments != []:
	right_end = segments[0][1]
	j = 0
	while j < len(segments):
		if segments[j][0] == right_end:
			right_end = segments[j][1]
			segments.remove(segments[j])
		else:
			j += 1
	count += 1
	segments.remove(segments[0])
print(count)


N = int(input())
print(N // 2 * (N // 2 + 1) + N // 2 + 1) if N & 1 else print(N // 2 * (N // 2 + 1))


def pedy(n):
	if n < 2:
		return n
	return n + pedy(n - 2)
print(pedy(int(input())))


N = int(input().rstrip())
if N % 2 == 0:
	segments = N / 2 * (N / 2 + 1)
else:
	segments = (N + 1) / 2 * ((N + 1) / 2)
print(int(segments))


x = int(input()) + 1
print(x // 2 * (x - x // 2))


n = int(input())
k = 0
for i in range(1, n + 1):
	k += min(i, n - i + 1)
print(k)


import sys

def f(x):
	if x != 2 and x != 1:
		return x + f(x - 2)
	else:
		return x
n = int(input())
print(f(n))


n = int(input())
if n & 1:
	print(n * (n + 1) // 2 - (n - 1) * (n + 1) // 4)
else:
	print(n * n // 2 - (n - 2) * n // 4)


print((int(input()) + 1) ** 2 // 4)


n = int(input())
f = [0] * (n + 1)
f[1] = 1
for i in range(2, n + 1):
	f[i] = i + f[i - 2]
print(f[n])


n = int(input())
mas = []
mas.append(0)
mas.append(1)
for i in range(2, n + 1):
	mas.append(i + mas[i - 2])
print(mas[n])


N = int(input())

def solve():
	if N % 2 == 0:
		a = N // 2
		print(2 * sum(range(1, a + 1)))
	else:
		a = (N - 1) // 2
		print(2 * sum(range(1, a + 1)) + (a + 1))
solve()


s = int(input())
if s % 2 == 0:
	print(s * (s + 2) // 4)
else:
	print((s + 1) ** 2 // 4)


def segments(n):
	result = 0
	while n > 0:
		result += n
		n -= 2
	return result
print(segments(int(input())))


n = int(input())

def get(n):
	if n % 2 == 1:
		k = (n + 1) // 2
		return k * k
	else:
		k = n // 2
		return k * (k + 1)
print(get(n))


n = int(input())
a = [int(i) for i in range(1, n + 1)]
p = []
for i in range(n):
	for j in range(i, n):
		p.append([i + 1, j + 1])
arr = [0] * n
for i in p:
	for j in range(i[0] - 1, i[1]):
		arr[j] += 1
print(max(arr))


n = int(input())
ans = 0
for i in range(n, 0, -2):
	ans += i
print(ans)


num = int(input().strip())
factor = 0
layers = 0
for x in range(num):
	if x % 2 == 0:
		factor += 1
	layers += factor
print(layers)


import math
s = int(input())
print(math.ceil((s / 2 + 1) * (s / 2)))


n = int(input())

def f(x):
	if x == 1:
		return 1
	if x % 2:
		return f(x - 1) + (x + 1) // 2
	return f(x - 1) + x // 2
print(f(n))


n = int(input())
n += 1
print((n + 1) // 2 * (n // 2))


n = int(input())
summa = 0
while n > 0:
	summa += n
	n -= 2
print(summa)


n = int(input())
l = [0] * n
for i in range(n):
	for j in range(n - i):
		for k in range(j, j + i + 1):
			l[k] += 1
print(max(l))


n = int(input())
cnt = 0
for l in range(1, n + 1):
	cnt += min(n - l + 1, l)
print(cnt)


n = int(input())
count = n * (n + 1) // 2
Sections = []
length = n
while length > 0:
	i = 0
	while i + length <= n:
		Sections.append((i, i + length))
		i += 1
	length -= 1

def create(A):
	length = len(A)
	A.sort(key=lambda x: x[1] - x[0])
	for i in range(length - 1, -1, -1):
		(a1, b1) = A[i]
		idx1 = -1
		idx2 = -1
		best_then = (-1, -1)
		best_pref = (-1, -1)
		diff_then = n
		diff_pref = n
		for j in range(i - 1, -1, -1):
			(a2, b2) = A[j]
			if a2 >= b1:
				d = n - b2
				if d < diff_then:
					diff_then = d
					best_then = b2
					idx1 = j
			elif b2 <= a1:
				d = a2
				if d < diff_pref:
					diff_pref = d
					best_pref = a2
					idx2 = j
		if diff_pref != n:
			A[i] = (best_pref, A[i][1])
			A.pop(idx2)
		if diff_then != n:
			A[i] = (A[i][0], best_then)
			A.pop(idx1)
	if len(A) == length:
		return A
	else:
		return create(A)
print(len(create(Sections)))


from math import ceil, floor
n = int(input())
print((floor(n / 2) + 1) * ceil(n / 2))


n = int(input())
s = 0
i = 0
side = int(n / 2)
while i < side:
	i += 1
	s += 2 * i
if n % 2 == 1:
	s += i + 1
print(s)


n = int(input())
if n % 2 == 0:
	res = (1 + n // 2) * (n // 2)
else:
	res = (n + 1) // 2
	n = n - 1
	res = res + (1 + n // 2) * (n // 2)
print(res)


n = int(input())
a = n / 2
b = a + 1
c = int(a * b)
if n % 2 == 0:
	print(c)
else:
	print(c + 1)


n = int(input())
points = n + 1
ans = 0
while points >= 2:
	ans = ans + (points - 1)
	points -= 2
print(ans)


n = int(input()) + 1
ans = 0
for i in list(range(2, n))[::-1]:
	if n >= i * 2:
		ans += i
	else:
		ans += n - i
print(ans + 1)


n = int(input())

def count(n):
	if n == 0:
		return 0
	if n == 1:
		return 1
	elif n < 1:
		return 0
	return n + count(n - 2)
print(count(n))


import math
n = int(input())
print((n // 2 + 1) * math.ceil(n / 2))


a = int(input())
print((a + 1) * (a + 1) // 4)


N = int(input())
print((N // 2 + 1) * ((N - 1) // 2 + 1))


import sys
n = int(input().strip())
if n % 2 == 1:
	print((n // 2 + 1) ** 2)
else:
	print(n * (n + 2) // 4)


n = int(input())
summ = 0
while n >= 0:
	summ += n
	n -= 2
print(summ)


def main():
	N = int(input())
	v = N + 1
	n = 0
	while v > 0:
		n += v - 1
		v -= 2
	print(n)
main()


import sys
n = int(input())
ans = 0
while n > 0:
	ans += n
	n -= 2
print(ans)


for i in range(1):
	n = int(input())
	x = n / 2
	if x > int(x):
		s = (n // 2 + 1) * (int(x) + 1)
		print(s)
	else:
		s = (n // 2 + 1) * int(x)
		print(s)


N = int(input())
ans = 1
done = [[False for _ in range(N + 1)] for _ in range(N + 1)]
for l in range(1, N):
	for b in range(N - l + 1):
		e = b + l
		if not done[b][e]:
			ans += 1
			done[b][e] = True
			if e <= N // 2:
				done[e][N - b] = True
			elif b >= N // 2:
				done[N - e][b] = True
print(ans)


from math import floor, ceil
num = int(input().strip())
if num == 1:
	print(1)
else:
	print((floor(num / 2) + 1) * ceil(num / 2))


n = int(input())
a = n // 2
if n % 2 == 0:
	print(n * (n + 2) // 4)
else:
	print(a * (a + 1) + (n + 1) // 2)


N = int(input())
segments = [[[start, length + start] for start in range(1, N - length)] for length in range(1, N - 1)]
total = 0
while N > 0:
	total += N
	N -= 2
print(total)


n = list(map(int, input().strip().split()))[0]
dp = dict()
dp[1] = 1
dp[2] = 2

def calculate(n):
	if n == 1:
		return 1
	elif n == 2:
		return 2
	else:
		answer = 1
		if n % 2 == 1:
			answer += 2 * (n // 2)
		else:
			answer += 2 * (n // 2) - 1
		return answer + calculate(n - 2)
print(calculate(n))


import math

def f(n):
	return f(n - 1) + math.ceil(n / 2) if n > 0 else 0
n = int(input())
print(f(n))


def solve(n):
	return int((n + n % 2) * (n + 2 - n % 2) / 4)
n = int(input())
print(solve(n))


a = int(input())
count = 0
while a > 0:
	count += a
	a -= 2
print(count)


import bisect

def list_output(s):
	print(' '.join(map(str, s)))

def list_input(s='int'):
	if s == 'int':
		return list(map(int, input().split()))
	elif s == 'float':
		return list(map(float, input().split()))
	return list(map(str, input().split()))
n = int(input())
S = list()
for i in range(n + 1):
	for j in range(i + 1, n + 1):
		S.append([2 * i, 2 * j])
res = 0
for x in range(1, 2 * n, 2):
	cnt = 0
	for s in S:
		if s[0] < x and x < s[1]:
			cnt += 1
	res = max(res, cnt)
print(res)


def S(x):
	if x == 1:
		return 1
	if x == 2:
		return 2
	else:
		return x // 2 + x % 2 + S(x - 1)
print(S(int(input())))


n = int(input())
a = []
for i in range(n):
	a.append((i + 1) * (n - i))
print(max(a))


import sys

def Rint():
	return map(int, input().split())
a = [0, 1]

def f(n):
	return 1 + 2 * (n // 2 - (0 if n % 2 else 1)) + (0 if n % 2 else 1) + a[n - 2]

def main():
	for line in sys.stdin:
		n = int(line)
		if n == 1:
			print(1)
			continue
		for i in range(2, n + 1):
			if i >= len(a):
				a.append(f(i))
		print(a[n])
main()


x = int(input())
if x % 2 == 1:
	m = (x + 1) // 2
else:
	m = x // 2
count = 0
for i in range(1, m + 1):
	count += i
if x % 2 == 1:
	print(count * 2 - m)
else:
	print(count * 2)


N = int(input())
a = 111 * [1]
a[0] = 0
a[1] = 1
a[2] = 2
for i in range(3, N + 1):
	a[i] = a[i - 2] + i
print(a[N])


import math

def main():
	x = input()
	x = int(x)
	ans = (math.floor(x) / 2 + 1) * (math.ceil(x) / 2)
	ans = math.ceil(ans)
	print(ans)
main()


print(int(((int(input()) + 1) / 2) ** 2))


import math
num = int(input())
first = math.ceil(num / 2)
second = math.floor(num / 2)
result = (second + 1) * first
print(result)


from math import *
a = int(input())
a += 1
print(floor(a * a / 4))


import sys
n = int(sys.stdin.readline().rstrip('\n'))
if n % 2 == 0:
	res = n // 2 * (n // 2 + 1)
	print(res)
else:
	res = (n // 2 + 1) * (n // 2 + 1)
	print(res)


n = int(input())
res = 0
while n > 0:
	res += n
	n -= 2
print(res)


import sys
import math
import itertools
import functools
import collections
import operator

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def wr(arr):
	return ' '.join(map(str, arr))

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)
n = ii()
t = math.ceil(n / 2)
print(t * (t + 1) - t * (n % 2))


n = int(input())
t = n // 2
if n % 2 == 0:
	print(t * (t + 1))
else:
	print(t * (t + 1) + t + 1)


n = int(input())
if n % 2 == 0:
	b = 2
else:
	b = 1
s = 0
for i in range(b, n + 1, 2):
	s += i
print(s)


N = int(input())
maxx = 0
on_left = 1
on_righ = N
for i in range(0, N, 1):
	maxx = max(on_left * on_righ, maxx)
	on_left += 1
	on_righ -= 1
print(maxx)


from sys import stdin, stdout
from gc import disable
disable()

def f(n: int) -> int:
	if n <= 1:
		return n
	else:
		return f(n - 2) + n
n = int(stdin.readline())
stdout.write('%i' % f(n))


n = int(input())
ans = [0, 1, 2, 4, 6]
for i in range(4, 100):
	ans.append(2 * ans[i] - 2 * ans[i - 2] + ans[i - 3])
print(ans[n])


from math import ceil
N = int(input())
S = N * (N + 1) / 2
F = int(ceil(N / 2.0))
ans = int((S + F) / 2)
print(ans)


n = int(input())
ar = []
for x in range(0, n + 1):
	for y in range(x + 1, n + 1):
		ar.append([x, y])
ans = 0
for x in ar:
	if x[0] <= (n + 1 - n % 2) / 2 <= x[1]:
		ans += 1
print(ans)


modulo = 1000000007
n = int(input())
ans = 0
for k in range(n):
	if (k + 1) * (n - k) > ans:
		ans = (k + 1) * (n - k)
print(ans)


n = int(input())
res = 0
for i in range(1, n + 1):
	start = 0
	layer = 0
	layers = 1
	for j in range(0, n - i + 1):
		if start + i > n:
			layers += 1
			layer += 1
			start = layer + i
		elif start + i == n:
			layer += 1
			start = layer
			if j != n - i:
				layers += 1
		else:
			start += i
	res += layers
print(res)


n = list(map(int, input().split()))[0]
x = 0
if n % 2 == 0:
	x = n // 2 * (n // 2 + 1)
else:
	x = (n // 2 + 1) ** 2
print(x)


n = int(input())
result = 0
mid = n // 2 + 1
for i in range(mid):
	result += i
for i in range(mid, n + 1):
	result += n - i + 1
print(result)


import math

def o(x):
	return x * (x + 1) / 2
n = int(input())
print(round(2 * o(math.floor(n / 2)) + (math.ceil(n / 2) if n % 2 == 1 else 0)))


n = int(input())
result = 0
for i in range(n):
	result = max(result, (i + 1) * (n - i))
print(result)


n = int(input())
if n % 2 == 0:
	res = 2
	for i in range(4, n + 1, 2):
		res += i
else:
	res = 1
	for i in range(3, n + 1, 2):
		res += i
print(res)


n = int(input())
s = n // 2
if n % 2 == 0:
	print(s ** 2 + s)
else:
	print(s ** 2 + s + s + 1)


n = int(input())
if n % 2 == 0:
	print(n // 2 * (n // 2 + 1))
else:
	nn = (n - 1) // 2
	print(n * (n + 1) // 2 - nn * (nn + 1))


n = int(input())
an = 0
a = [0] * (n + 1)
for i in range(n):
	for s in range(1, n - i + 1):
		a[i] += 1
		a[i + s] -= 1
for i in range(len(a)):
	if a[i] > 0:
		an += a[i]
print(an)


import math
n = int(input()) + 1
print(n * n // 4)


n = int(input())
print(sum(range(n, 0, -2)))


n = int(input())
c = n
i = 1
while c <= (n - i + 1) * i:
	c = (n - i + 1) * i
	i += 1
print(c)


import sys
f = sys.stdin
n = int(f.readline())
ans = [1, 2, 4, 6, 9, 12, 16, 20, 25, 30, 36, 42, 49, 56, 64, 72, 81, 90, 100, 110, 121, 132, 144, 156, 169, 182, 196, 210, 225, 240, 256, 272, 289, 306, 324, 342, 361, 380, 400, 420, 441, 462, 484, 506, 529, 552, 576, 600, 625, 650, 676, 702, 729, 756, 784, 812, 841, 870, 900, 930, 961, 992, 1024, 1056, 1089, 1122, 1156, 1190, 1225, 1260, 1296, 1332, 1369, 1406, 1444, 1482, 1521, 1560, 1600, 1640, 1681, 1722, 1764, 1806, 1849, 1892, 1936, 1980, 2025, 2070, 2116, 2162, 2209, 2256, 2304, 2352, 2401, 2450, 2500, 2550]
print(ans[n - 1])


ONLINE_JUDGE = not __debug__
if ONLINE_JUDGE:
	print('kek')
import math
n = int(input())
print((n // 2 + 1) * math.ceil(n / 2))


a = [-1] * 101
a[1] = 1
a[2] = 2
for i in range(3, 101):
	a[i] = a[i - 2] + i
print(a[int(input())])


import math
a = int(input())
if a == 1:
	print(1)
elif a == 2:
	print(2)
elif a == 3:
	print(4)
elif a == 4:
	print(6)
else:
	b = a
	d = a - 2
	e = 1
	while d > 0:
		if d >= e:
			b += e
		else:
			b += d
		d -= 1
		e += 1
	print(b)


n = int(input())
ans = 0
for i in range(n):
	ans = max(ans, (i + 1) * (n - i))
print(ans)


n = int(input())
ans = n
while True:
	n -= 2
	if n < 0:
		break
	ans += n
print(ans)


n = int(input())
items = {}
for i in range(1, n + 1):
	ci = []
	for j in range(n - i + 1):
		curr = '0' * j + '1' * i + '0' * (n - i - j)
		curr = int(curr, 2)
		ci.append(curr)
	items[i] = ci
maximal = 2 ** n

def stopcheck():
	for (k, v) in items.items():
		if len(v) != 0:
			return False
	return True

def getnext():
	global ans
	global curr
	global total
	for k in range(total, 0, -1):
		if len(items[k]) == 0:
			continue
		for num in items[k]:
			if curr & num == 0:
				items[k].remove(num)
				curr = curr | num
				total -= k
				return True
	return False
ans = 0
while True:
	if stopcheck():
		break
	curr = 0
	total = n
	ans += 1
	while curr < maximal:
		if not getnext():
			break
print(ans)


N = int(input())
ans = 0
while N > 0:
	ans += N
	N -= 2
print(ans)


q = int(input())
t = q // 2
if q % 2 == 0:
	print(t * (t + 1))
else:
	print(t * (t + 2) + 1)


def f(n):
	if n <= 1:
		return n
	else:
		return f(n - 2) + n
n = int(input())
print(f(n))


n = int(input())
r = 0
for i in range(1, n + 1):
	start = i
	say = n - i + 1
	if say >= i:
		say = i
	r += say
print(r)


def main():
	N = int(input())
	add = 0
	while N > 0:
		add += N
		N -= 2
	print(add)
main()


ka = int(input())
print((ka // 2 + 1) * ((ka - 1) // 2 + 1))


n = int(input())
ans = 0
while n >= 0:
	ans += n
	n -= 2
print(ans)


n = int(input())
dp = [0] * 101
dp[1] = 1
dp[2] = 2
for i in range(3, 101):
	dp[i] = dp[i - 2] + i
print(dp[n])


n = int(input())
if n % 2 == 0:
	sum_ = n * (n + 2) / 4
else:
	sum_ = (n + 1) ** 2 / 4
print(int(sum_))


import math
n = int(input())
ans = 0
for i in range(1, int(math.ceil(n / 2)) + 1):
	ans += i
for j in range(n // 2, 0, -1):
	ans += j
print(ans)


x = int(input())
sum = 0
if x % 2 == 1:
	n = x - 1
	while n > 0:
		sum += n + 1
		n -= 2
	sum += 1
else:
	n = int(x * 2 / 2)
	while n > 0:
		sum += n
		n -= 2
print(sum)


n = int(input())
cnt = 0
cur_cnt = 1
for i in range(n, 0, -1):
	cnt += min(cur_cnt, i)
	cur_cnt += 1
print(cnt)


n = int(input())
ans = n
a = n
for i in range(1, n):
	ans -= i
	ans += n - i
	a = max(a, ans)
print(a)


n = int(input())
ans = 0
for i in range(n // 2 + (0 if n % 2 == 0 else 1)):
	l = n - 2 * i
	if l <= 0:
		break
	ans += l
print(ans)


n = int(input())
k = n // 2 * (n // 2 + 1)
print(k if n % 2 == 0 else k + (n + 1) // 2)


from collections import deque

def main():
	n = int(input())
	intervals = deque()
	ans = 0
	for i in range(0, n + 1):
		for j in range(i + 1, n + 1):
			l = len(intervals)
			for k in range(l):
				(s, e) = intervals[0]
				if s <= i < j <= e:
					intervals.popleft()
					if i < s:
						intervals.appendleft((s, i))
					if j < e:
						intervals.appendleft((j, e))
					break
				intervals.rotate(1)
			else:
				ans += 1
				intervals.append((0, i))
				intervals.append((j, n))
	print(ans)
main()


n = int(input())
sm = 0
for i in range(n, -1, -2):
	sm += i
	if n <= 2:
		break
print(sm)


def foobar(n):
	list = [0] * n
	for i in range(n + 1):
		l = n - i + 1
		for j in range(n - l + 1):
			for k in range(j, j + l):
				list[k] += 1
	max = 0
	for i in list:
		max = max if max > i else i
	print(max)
n = input()
foobar(int(n))


def afd(nn):
	if nn < 2:
		return nn
	return nn + afd(nn - 2)
print(afd(int(input())))


n = int(input())
a = [0 for i in range(n + 10)]
a[1] = 1
a[2] = 2
for i in range(3, n + 1):
	a[i] = i + a[i - 2]
print(a[n])


a = int(input())
print((a // 2 + 1) * ((a + 1) // 2))


n = int(input())
d = 110 * [0]
d[0] = 0
d[1] = 1
for t in range(2, n + 1):
	d[t] = d[t - 2] + t
print(d[n])


N = int(input())
print(sum(range(N, 0, -2)))


def main():
	n = int(input())
	print((n // 2 + 1) * ((n + 1) // 2))
main()