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  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.

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

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

NoteAs an example, here are the segments and their optimal arrangement into layers for N = 4.

n = input()
if (n %2 == 0):
    ans = []
    for i in range(n+1):
        if (i%2 == 0):
            ans.append(i)
    print reduce(lambda x,y:x+y, ans, 0)

if (n %2 == 1):
    ans = []
    for i in range(n+1):
        if (i%2 == 1):
            ans.append(i)
    print reduce(lambda x,y:x+y, ans, 0)

n=int(raw_input())
s=[]
for i in range(1,n+1):
	for j in range(n-i+1):
		s.append((j,-j-i))

s.sort()
#print(s)
c=0
while(True):
	if len(s)==0:
		break
	w=s[0]
	del s[0]
	i=0
	f=len(s)
	#print(c,s)
	while(i<f):
		if -w[1]<=s[i][0]:
			#r.append(i)
			w=s[i]
			del s[i]
			f-=1
		i+=1
	c+=1

print(c)

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)

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))

ONLINE_JUDGE = not __debug__
if ONLINE_JUDGE:
    print('kek')

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

n=input()
layer=0
for line in range(n):
    layer=layer+1
    rem=n%(line+1)
    d=n/(line+1)
    if(d==1):
        layer=layer+rem
    if(d>1):
        layer=layer+line
else:print layer

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

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

n=int(raw_input())

a=0
for i in range(1,n+1):
    a=a+min(i,n-i+1)

print a

import sys
from collections import *
from string import *
from itertools import *
from math import ceil
n = input()
temp = n/2
ans = temp*(temp+1)
if n&1:
    ans += (n/2+1)
print ans

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

#!/usr/bin/python

from collections import deque

def ir(): return int(raw_input())

n = ir()
c = n/2
s = 0
for i in xrange(0, n):
    for j in xrange(0, n):
        if not i <= j: continue
        if i <= c and c <= j: s += 1
print s

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)

# Problem: Segment

if __name__ == "__main__":
    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]))
    #print(segment)
    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())
cnt=0
for l in range(1,n+1):
    cnt+=min(n-l+1,l)
print(cnt)

def num_layers(n):
    count = 0
    for segment_len in xrange(1, n + 1):
        for start_pos in xrange(segment_len):
            if start_pos + segment_len <= n:
                count += 1
    return count

n = int(raw_input())
print num_layers(n)

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

n = input()
N = n * (n + 1) / 2

segs = dict()
for i in range(1, n + 1):
    segs[i] = []

for len in range(1, n + 1):
    for i in range(n, len - 1, -1):
        segs[i].append(len)

lays = 0
cnt = 0
curr = n
while cnt < N:
    while segs[curr] != []:
        cc = curr
        while cc > 0:
            while cc > 0 and segs[cc] == []:
                cc -= 1
            if cc == 0:
                break

            cct = cc - segs[cc][-1]
            # print (cct, cc),
            segs[cc].pop()
            cc = cct
            cnt += 1
        lays += 1
        # print ""
    curr -= 1

print lays

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))

from copy import deepcopy
def query(l,r, segs):
    global ans
    global N
    if l>=N:
        ans=min(ans,len(segs))
    elif r>=N:
        query(l+1,l+1,segs)
    else:
        Len = r-l+1
        temp = [0 for i in xrange(N)]
        for k in xrange(l,r+1):
            temp[k]=1
        query(l,r+1,segs+[temp])
        for i in xrange(len(segs)):
            if sum(segs[i][l:r+1]) == 0:
                poss=deepcopy(segs)
                for k in xrange(l,r+1):
                    poss[i][k]=1
                query(l,r+1,poss)
N=int(raw_input())+1
print N**2/4

def main():
    N = int(input())

    v = N + 1
    n = 0
    while v > 0:
        n += v - 1
        v -= 2

    print(n)

main()

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)

if __name__ == '__main__':
    main()

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

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)

import math
n = int(raw_input())
ans = (int(n/2)+1)*(n-int(n/2))
print ans

'''
INPUT SHORTCUTS
N, K = map(int,input().split())
N ,A,B = map(int,input().split())
string = str(input())
arr = list(map(int,input().split()))
N = int(input())
'''

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

main()

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

#codig: utf-8

N = int(raw_input())

res = 0
for i in range(1, N+1):
    res += min(i, (N+1)-i)

print res

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

import math
# cook your dish here
s = int(input())
print(math.ceil((s/2+1)*(s/2)))

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
		#print(i, start, layers)
	res += layers
print(res)

n = int(raw_input())
max = 0
for i in xrange(n):
    c = (i + 1) * (n - i)
    if c > max:
        max = c
print max

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

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

#!/usr/bin/env python

import sys

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

a = [0,1]
def f(n):
    # print('1', 2*(n//2-(0 if n%2 else 1)))
    # print('2', a[n-2])
    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)
        print(a[n])

main()

n = int(raw_input(''))
n += 1
print (n/2)*(n-n/2)

def solve():
    n=input()
    a=1
    b=1
    for x in xrange(2,n+1):
        if a==b: a+=1
        else:
            if a>b:b+=1
            else:a+=1
    print a*b
solve()

#template-
from sys import stdout
# fi=open("input.txt","r")
# fo=open("output.txt","w")

n=int(raw_input())
ans=0
for i in range(n):
	pieces=n-i
	ans+=min(pieces,i+1)
	# fo.write(" " + str(i) + " " +  str(ans) +"\n")
stdout.write(str(ans)+"\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)

if __name__ == '__main__':
	main()

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))

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)

import math

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

print(result)

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)

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

print(segments(int(input())))

def main():
    N = int(input())

    v = N + 1
    n = 0
    while v > 0:
        n += v - 1
        v -= 2

    print(n)

main()

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))

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

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

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))

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

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)

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

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

n = int(raw_input(''))
n += 1
print (n/2)*(n-n/2)

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))

import math
n = int(raw_input())
ans = (int(n/2)+1)*(int(math.ceil(float(n)/2.0)))
print ans

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)

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

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

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

import math

def main():
	x = input()
	x = int(x)

	print(((math.floor(x)/2)+1)*(math.ceil(x)/2))

if __name__ == '__main__':
	main()

import math

def main():
	x = input()
	x = int(x)

	print(int(((math.floor(x)/2)+1)*(math.ceil(x)/2)))

if __name__ == '__main__':
	main()

n = int(input())
if n == 1:
    print(1)
else:
    print((n * (n + 1)) // 3)

n = int(input())
a = [int(i) for i in range(1, n + 1)]
p = []
lens = []
ans = 0
for i in range(n):
    for j in range(i, n):
        p.append(a[i:j + 1])
        lens.append(j - i + 1)
lens.sort()
l = len(lens)
for i in range(1, n + 1):
    if n % i == 0:
        for j in range(n // i):
            if i in lens:
                lens.remove(i)
        ans += 1
print(ans + len(lens))

n = int(input())
a = [int(i) for i in range(1, n + 1)]
p = []
lens = []
ans = 0
for i in range(n):
    for j in range(i, n):
        p.append(a[i:j + 1])
        lens.append(j - i + 1)
lens.sort()
for i in range(len(lens)):
    for j in range(i, len(lens)):
        if sum(lens[i:j + 1]) == n and -1 not in lens[i:j + 1]:
            ans += 1
            for k in range(i, j + 1):
                lens[k] = -1
for i in lens:
    if i > -1:
        ans += 1
print(ans)

n = int(input())
a = [int(i) for i in range(1, n + 1)]
p = []
lens = []
ans = 0
for i in range(n):
    for j in range(i, n):
        p.append(a[i:j + 1])
        lens.append(j - i + 1)
lens.sort()
for i in range(len(lens)):
    for j in range(i, len(lens)):
        if sum(lens[i:j + 1]) == n:
            for k in range(i, j + 1):
                lens[k] = -1000000
            ans += 1
for i in range(len(lens)):
    for j in range(i):
        if lens[i] + lens[j] == n:
            lens[i] = -1000000
            lens[j] = -1000000
            ans += 1
for i in lens:
    if i > 0:
        ans += 1
print(ans)

n = int(input())
a = [int(i) for i in range(1, n + 1)]
p = []
lens = []
ans = 0
for i in range(n):
    for j in range(i, n):
        p.append([i + 1, j + 1])
        lens.append(j - i + 1)
lens.sort()
l = len(lens)
for i in range(1, n + 1):
    if n % i == 0:
        l -= n // i
        ans += 1
print(ans + l)
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())
add = 1
out = 0
add_to_add = -1

if n == 1:
    print(1)
    exit()

elif n == 2:
    print(2)
    exit()

else:
    for i in range(3, n + 1):
        add_to_add += 1
        add += add_to_add
        out = i + add

print(out)

n = int(input())
k = 0

if n == 1:
    print(1)
    exit()

else:
    for i in range(n - 1):
        k += 2

print(k)

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)

print(maxx)

x = int(input())
if(x == 1):
	print(1)
else:
	print(x*2 - 2)

if __name__ == "__main__":
	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]))
	print(segment)
	layer_count = 0
	while segment != []:
		rightend = segment[0][1]
		segment.remove(segment[0])
		j = 0
		while j < len(segment):
			if segment[j][0] == rightend:
				rightend = segment[j][1]
				segment.remove(segment[j])
			else:
				j += 1
		layer_count += 1
	print(layer_count)

# coding: utf-8

# In[11]:

n = int(input())
k = (n + 1) // 2
a = 1
for i in range(k + 1, n + 1):
    a = a * i
for i in range(1, n - k + 1):
    a = a // i
print(a)

# In[ ]:

n=int(input())
if n==1:
    print(1)
else:
    print(2*n-2)

n = int(input())

res = 1
for i in range(1, n):
	res += int((n-i+1) / (n//i))
	if (n-i+1) % (n//i) != 0:
		res += 1
print(res)

for i in range(1):
    n=int(input())
    print(n-2+n)

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

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

'''a,b = input().split()
t = ''
l = chr(ord('z')+1)
for i in range(len(a)):
    if a[i]<l:
        t+=a[i]
        l = a[i]
    else :break
l = chr(ord('z')+1)
for i in range(len(b)):
    if b[i]<l:
        t+=b[i]
        l = b[i]
    else :break
print(t+b[0])
'''
n = int(input())
if n == 1:print(1)
else :print(2*n-2)

#!/usr/bin/env python

import sys

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

a = [0,1]
def f(n):
    return 1+2*((n+1)//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):
            a.append(f(i))
        print(a[n])

main()

#!/usr/bin/env python

import sys

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

for line in sys.stdin:
    n = int(line)
    print((n-1)*2)

n=input()
layer=0
for line in range(n+1):
    layer=layer+1
    rem=n%(line+1)
    d=n/(line+1)
    if(d>1):
        layer=layer+ (    (d-1)   *   (line)   )  +rem
if(n==1):print 1
if(n==2):print 2
else:print layer

n=input()
layer=0
for line in range(n):
    layer=layer+1
    rem=n%(line+1)
    d=n/(line+1)
    if(d==1):
        layer=layer+rem
    if(d>1):
        layer=layer+line+rem
else:print layer

from copy import deepcopy
def query(l,r, segs):
    global ans
    global N
    if l>=N:
        ans=min(ans,len(segs))
    elif r>=N:
        query(l+1,l+1,segs)
    else:
        Len = r-l+1
        temp = [0 for i in xrange(N)]
        for k in xrange(l,r+1):
            temp[k]=1
        query(l,r+1,segs+[temp])
        for i in xrange(len(segs)):
            if sum(segs[i][l:r+1]) == 0:
                poss=deepcopy(segs)
                for k in xrange(l,r+1):
                    poss[i][k]=1
                query(l,r+1,poss)
N=int(raw_input())
print N**2/4

def main():
    n=input()
    if n==1:
        print 1
    else:
        print (n-1)*2

main()

num = int(raw_input())

resp = 1
lista = [i for i in range(num, 1, -1)]

for i in range(len(lista)-1, -1,-1):
    while lista[i] > 0:
        cont = i + 1
        for j in range(len(lista)-1, -1, -1):
            if cont + j+1 <= num and lista[j] and lista[i]:
                cont += j +1
                lista[j] -= 1

        lista[i]-= 1
        resp += 1

print resp

num = int(raw_input())

resp = 1
lista = [i for i in range(num, 1, -1)]

for i in range(len(lista)):
    lista[i] -= 2
    resp += 1
for i in range(len(lista)):
    if lista[i] != 0:
        lista[i] = 0
        resp += 1

print resp

num = int(raw_input())

resp = 1
lista = [i for i in range(num, 1, -1)]

for i in range(len(lista)-1, -1,-1):
    while lista[i] > 0:
        for j in range(len(lista)):
            if i+1 + j+1 <= num and lista[j] and lista[i]:
                lista[i] -= 1
                lista[j] -= 1
                resp += 1

print resp

N = int(raw_input())
if N==1:
  print 1
else:
  print (N-1)*2

#template-
from sys import stdout
# fi=open("input.txt","r")
# fo=open("output.txt","w")

n=int(raw_input())
ans=0
for i in range(n):
	pieces=n-i
	needed=n/(i+1)
	# fo.write(str(pieces) + " " + str(i) + " " + str(needed) + "\n")
	ans+=(pieces/needed) + (pieces%needed)
stdout.write(str(ans)+"\n")

n=input()
if n==2:
  print 2
if n==3:
  print 4
if n==4:
  print 6
if n==5:
  print 9
if n==6:
  print 12

n=int(raw_input())
li=range(1,n+1)
li=li[::-1]
lay=0
for i in range(n-1,-1,-1):
	lim=li[i]
	# print "i li ::",li
	for j in range(li[i]):
		li[i]-=1
		# print "j li ::",li
		seg=n-(i+1)
		# print "seg ::",seg
		lay+=1
		k=seg
		while seg>0 and k>0:
			if li[k-1]:
				li[k-1]-=1
				seg-=1
				# print "if ",li
			else:
				k-=1
		if li[i]:
			pass
		else:
			break
	else:
		pass
else:
	pass
print lay

n = input()
N = n * (n + 1) / 2

segs = []

for i in range(0, n):
    for len in range(1, n - i + 1):
        segs.append([(i, i + len), False])

lays = 0
for i in range(N-1, 0, -1):
    if segs[i][1]:
        continue

    curr = segs[i][0][0]
    for j in range(i - 1, -1, -1):
        if segs[j][1] == False and segs[j][0][1] <= curr:
            segs[j][1] = True
            curr = segs[j][0][0]
    lays += 1

print lays

n = input()
N = n * (n + 1) / 2

segs = []

for i in range(0, n):
    for len in range(1, n - i + 1):
        segs.append([(i, i + len), False])

lays = 0
for i in range(N-1, 0, -1):
    if segs[i][1]:
        continue

    arr = [segs[i][0]]
    for j in range(i - 1, -1, -1):
        if segs[j][1] == False:
            flag = True
            for seg in arr:
                if seg[0] >= segs[j][0][1] or seg[1] <= segs[j][0][0]:
                    continue
                else:
                    flag = False
                    break
            if flag:
                segs[j][1] = True
                arr.append(segs[j][0])
    lays += 1

print lays

n = input()
N = n * (n + 1) / 2

segs = []

for i in range(0, n):
    for len in range(1, n - i + 1):
        segs.append([(i, i + len), False])

lays = 0
for i in range(N-1, -1, -1):
    if segs[i][1]:
        continue

    arr = [segs[i][0]]
    segs[i][1] = True
    for j in range(i - 1, -1, -1):
        if segs[j][1] == False:
            flag = True
            for seg in arr:
                if seg[0] >= segs[j][0][1] or seg[1] <= segs[j][0][0]:
                    continue
                else:
                    flag = False
                    break
            if flag:
                segs[j][1] = True
                arr.append(segs[j][0])
    lays += 1

print lays

n=int(raw_input())

a=1
for i in range(1,n+1):
    a=a+min(i,n-i+1)

print a

n = int(raw_input(''))
if n == 1:
    print 1
    exit(0)
print n + (n-2)

import sys

n = int(sys.stdin.readline().strip())

a = [None] * 105

a[1] = 1
a[2] = 2
a[3] = 4
a[4] = 6

if n <= 4:
    print a[n]
else:
    for i in xrange(5, n + 1):
        a[i] = a[i - 1] + (i - 1)

    print a[n]

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

n=int(input())
if n==1:
  print(1)
else:
  print(2*(n-1))

n=int(input())
if n==1:
  print(0)
elif n==2:
  print(2)
elif n==3:
  print(4)
else:
  print((n*(n-1))//2)

n = int(input())
rows = []
used = []
for i in range(n):
    for _ in range(i+1):
        for j in range(len(rows)):
            if not used[j] and rows[j] + n - i <= n:
                used[j] = True
                rows[j] += n - i
                break
        else:
            rows.append(n-i)
            used.append(False)
print(len(rows))

if __name__ == "__main__":
    num = int(input().strip())
    if num == 1:
        print(1)
    else:
        print((num-2)+num)

n = int(input())
prev = 1
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)

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()
print(2*n - 2)

n = int(input());
n += 1
x = (n + 1)/2
y =  int(n / 2)
u = int(x * y)
print (u);

from sys import stdin,stdout
#stdin.readline()
#stdout.write()
#raw_input()
#map(int,raw_input().split())
#map(int,stdin.readline().split())
x=int(stdin.readline())
print (x-1)*2

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 += (n - cur) // 2 + 1
    cur -= 1
print(s)

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

n = int(input())
li = []
hv = dict()
j = 1
for i in range(n,0,-1):
    hv[i] = j
    j+=1

ans = 0
for i in range(n,0,-1):
    if hv[i]>0:
        t = i
        hv[i]-=1
        for j in range(1,i+1):
            while t<=n and hv[j]>0:
                t+=j
                hv[j]-=1
            if t>n:
                t-=j
                hv[j]+=1
            ans+=1
            if hv[i]==0:
                break
            hv[i]-=1
print(ans)

import math
n = int(input())
li = []
hv = dict()
j = 1
for i in range(n,0,-1):
    hv[i] = j
    j+=1

ans = 0
for i in range(n,0,-1):
    if hv[i]>0:
        t = i
        for j in range(1,i+1):
            hv[i]-=1
            while t<=n and hv[j]>0:
                t+=j
                hv[j]-=1
            if t>n:
                t = j
                hv[j]+=1
            ans+=1
            if hv[i]==0:
                break
for i in range(n,0,-1):
    if hv[i]>0:
        t = i
        hv[i]-=1
        while hv[i]>0:
            t+=i
            hv[i]-=1
        ans+=math.ceil(float(t)/n)
print(ans)

import math
n = int(input())
hv = dict()
ans = 0
j = 1
for i in range(n,-1,-1):
    hv[i] = j
    j+=1

for i in range(n,n//2,-1):
    ans+=hv[i]
    hv[n-i] -= hv[i]
    hv[i] = 0

for i in range(n,0,-1):
    if hv[i] and i==1:
        ans+=1
    elif hv[i]:
        ans+=math.ceil(hv[i]/float(i))
print(ans)

import math
n = int(input())
if n==1:
    print(1)
else:
    print(n*(n-1)//2)

import math
n = int(input())
hv = dict()
ans = 0
j = 1
for i in range(n,-1,-1):
    hv[i] = j
    j+=1

for i in range(n,n//2,-1):
    ans+=hv[i]
    hv[n-i] -= hv[i]
    hv[i] = 0

for i in range(n,0,-1):
    ans+=math.ceil(hv[i]/2.0)
print(ans)

import math
n = int(input())
hv = dict()
ans = 0
j = 1
for i in range(n,-1,-1):
    hv[i] = j
    j+=1

for i in range(n,n//2,-1):
    ans+=hv[i]
    hv[n-i] -= hv[i]
    hv[i] = 0

for i in range(n,0,-1):
    if hv[i] and i==1:
        ans+=1
    elif hv[i]:
        ans+=math.ceil(hv[i]/2.0)
print(ans)

import math
n = int(input())
if n==1:
    print(1)
else:
    print((n-1)*2)

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

n = int(input())
ans = 2 * (n - 1)
print(ans)

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

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