peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
A,B = map(int,input().split())
N = A+B

if N % 2 == 0:
    print((A+B)//2)
elif N % 2 != 0:
    print("IMPOSSIBLE")
# Judge status: Wrong Answer
INF = 10**7 + 7

N = int(input())
power = 1

for i in range(1, N+1):
    power *= i 
    power %= INF

print(power)
# Judge status: Accepted
#coding: utf-8
import math
import heapq
import bisect
import numpy as np
from collections import Counter
#from scipy.misc import comb

N = int(input())
A = list(map(int, input().split()))

for i in range(N):
    A[i] -= i
A.sort()

if(N%2):
    b = A[N//2]
else:
    b = (A[N//2]+A[N//2-1])//2

ans1 = 0
ans2 = 0
for a in A:
    ans1 += abs(a-b)
    ans2 += abs(a-(b+1))

print(min(ans1, ans2))
# Judge status: Accepted
a = input().split()
s = a[1][0]
ans = 'A' + s + 'C'
print(ans)
# Judge status: Accepted
n = int(input())
s = [input() for _ in range(n)]
ans = [float('inf')] * 26
for i in range(n):
    cnt = [0] * 26
    for j in s[i]:
        cnt[ord(j) - ord('a')] += 1
    for j in range(26):
        ans[j] = min(ans[j], cnt[j])
test = ''
for i in range(26):
    for _ in range(ans[i]):
        test += chr(i + ord('a'))
print(test)
# Judge status: Accepted
n,k = map(int,input().split())
s = list(input())

a = 0
for i in range(n-1):
    if s[i] != s[i+1]:
        a += 1
print(n-1-max(a-2*k,0))
# Judge status: Wrong Answer

n = int(input())

for i in range(7):
    if 2**i> n:
        break

print(2**(i-1))
# Judge status: Accepted
n, m = map(int, input().split())
n, m = min(n, m), max(n, m)
if n == m == 1:
	print(1)
elif n == 1:
	print(m - 2)
else:
	print((n-2)*(m-2))
# Judge status: Accepted
val = input()
if val=="ABC":
  print("ARC")
elif val=="ARC":
  print("ABC")
# Judge status: Accepted
S = str(input())[::-1]
words = ['maerd', 'esare', 'remaerd', 'resare']

leng = len(S)
while leng>=5:
    if S[:5] in words:
        S = S[5:]
        leng -= 5
    elif leng>=7 and S[:7] in words:
        S = S[7:]
        leng -= 7
    elif leng>=6 and S[:6] in words:
        S = S[6:]
        leng -= 6
    else:
        print('NO')
        break

if leng==0:
    print('YES')
# Judge status: Accepted
n = int(input())
l = list(map(int,input().split()))
 
ans = 0
 
for i in range(n):
  for j in range(i+1,n):
    for k in range(j+1,n):
      if l[i] != l[j] and l[j] != l[k] and l[i] != l[k]:
        if l[i]+l[j]>l[k] and l[j]+l[k]>l[i] and l[i]+l[k]>l[j]:
          ans += 1
        
print(ans)
# Judge status: Accepted
x, y = map(int, input().split())
ans = 1 ; num = x
while True :
    if num * 2 <= y :
        ans += 1
        num *= 2
    else :
        break
print(ans)
# Judge status: Accepted
# A - Red or Not

# 整数 a の入力
a = int(input())

# 文字列 s の入力
s = input()

# print(a)
# print(s)

if a >= 3200:
    # print(s)
    answer = s
else:
    # print('red')
    answer = 'red'

# 結果の出力
print(answer)
# Judge status: Wrong Answer
n,a,b = map(int,input().split())

if a == b:
  ans = 0
elif abs(a-b)%2 == 0:
  ans = abs(a-b)//2
elif abs(a-b)%2 == 1:
  if a < b:
    if (a-1) > (n-b):
      ans = n-b
    else:
      ans = a-1
  else:
    if (b-1) > (n-a):
      ans = n-a
    else:
      ans = b-1
      
print(ans)
# Judge status: Wrong Answer
N, K = map(int, input().split())
ans = 0

while N > 0:
  N /= K
  ans += 1
  
print(ans)
# Judge status: Accepted
a,b,c =map(int,input().split())
e = max(a,b,c)
f = 3*e -a-b-c
while f % 2 ==1:
    f += 3
print(int(f/2))
# Judge status: Accepted
A = int(input())
B = int(input())
func = lambda A, B: 6-(A+B)
print(func(A,B))
# Judge status: Accepted
s = input()
if s[-1] == 's':
    print(s + "es")
else:
    print(s + "s")
# Judge status: Accepted
from string import ascii_lowercase as l
from collections import Counter
_, *s = map(Counter, open(0))
t = ""
for a in l:
  t += a * min(c.get(a, 0) for c in s)
print(t)
# Judge status: Accepted
n = int(input())
p = list(map(int, input().split()))
res = 0
for i in range(1, n-1):
    if p[i-1] < p[i] < p[i+1] or p[i+1] < p[i] < p[i-1]:
        res += 1
print(res)
# Judge status: Accepted
X, A, B = list(map(int,input().split()))
if A >= B:
    print('delicious')
elif B-A<=X:
    print('safe')
else:
    print('dangerous')
# Judge status: Accepted
import bisect
N = int(input())
if len(str(N)) == 1:
    print(N)
    exit()
L = len(list(str(N)))-1
A = [10**(L)*i+10**(L)-1 for i in range(10)]  
n = bisect.bisect_left(A,N)-1
if N in A:
    n += 1
ans = [int(list(str(A[n]))[i]) for i in range(len(list(str(A[n]))))]
print(sum(ans))
# Judge status: Accepted
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n,m,k = inpl()
for i in range(n+1):
    for j in range(m+1):
        now = i*m+j*n-i*j*2
        if now == k:
            print('Yes')
            quit()
print('No')
# Judge status: Wrong Answer
N, M = map(int, input().split())
A = list(map(int, input().split()))

memo = {}

def gcm(a, b):
    if b == 0:
        return a
    if (a, b) in memo:
        return memo[(a, b)]
    ans = gcm(b, a % b)
    memo[(a, b)] = ans
    return ans

def lcm(a, b):
    a, b = max(a, b), min(a, b)
    return a * b // gcm(a, b)

b = 1

for a in A:
    b = lcm(a//2, b)

ans = M // b
print(ans - ans // 2)
# Judge status: Wrong Answer
from fractions import gcd
a,b = map(int,input().split())
print(a*b/(gcd(a,b)))
# Judge status: Accepted
a=input()
b=list(map(int,input().split()))
b.sort()
if sum(b)-max(b)-max(b)>0:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
X, N = input().split()
X = int(X)
N = int(N)
searchA = X
searchB = X
max = 100
z = X

if N != 0:
  A = list(map(int, input().split()))
  for val in range(max):
    if searchA in A:
      if searchA > -1:
        searchA -= 1
      else:
        continue
    else:
      z = searchA
      break
    if searchB in A:
      if searchB < 102:
        searchB += 1
      else:
        continue
    else:
      z = searchB
      break
    
print(z)
# Judge status: Wrong Answer
n = int(input())

def sum_digit(num):
    sum = 0
    while(num > 0):
        sum += num % 10
        num /= 10
    return sum

all = []

for a in range(n):
    sum_A =sum_digit(a+2)
    sum_B =sum_digit(n-a+2)
    all.append(sum_A + sum_B)

print(min(all))
# Judge status: Accepted
n, m = map(int, input().split())
if n == 1 and m == 1:
  print(1)
  exit(0)

w = n - 2
h = m - 2
if n == 1:
  print(h)
  exit(0)
if m == 1:
  print(w)
  exit(0)
  
print(w*h)
# Judge status: Accepted
n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

print(n - len(set(a)))
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-
"""
Created on Tue Jun  2 22:08:10 2020

@author: NEC-PCuser
"""

N, M, K =  map(int, input().split())
ans = "No"
for i in range(0, N):
    for j in range(0, M):
        kosu = i * M - 2 * j * i + j * N
        if (kosu == K):
            ans = "Yes"
            break
    else:
        continue
    break
print(ans)
# Judge status: Accepted
H, N = map(int, input().split())
A=[]
B=[]
for i in range(N):
	a,b = map(int, input().split())
	A.append(a)
	B.append(b)
#dp[i+1][h] := i番目の魔法まで見て、ライフをh以上削った時の最小魔力コスト
dp=[[float("inf")]*(H+1) for _ in range(N+1)]

for i in range(N):
	for h in range(H+1):
		if A[i]>=h:
			dp[i+1][h] = min(dp[i][h], B[i])
		else:
			dp[i+1][h] = min(dp[i][h], dp[i+1][h-A[i]]+B[i])
print(dp[-1][-1])
# Judge status: Wrong Answer
s = input()

ans0 = 0
ans1 = 1
for i, s_i in enumerate(s):
    if i % 2 == 0:
        if s_i == '0':
            ans1 += 1
        else:
            ans0 += 1
    else:
        if s_i == '0':
            ans0 += 1
        else:
            ans1 += 1
print(min(ans0, ans1))
# Judge status: Accepted
n, m = map(int, input().split())
l = []
for i in range(n):
    a = list(map(int, input().split()))
    a.pop(0)
    l.append(a)
cnt1 = 0
for i in range(m):
    cnt2 = 0
    for j in range(n):
        if i + 1 in l[j]:
            cnt2 += 1
    if cnt2 == n:
        cnt1 += 1
print(cnt1)
# Judge status: Accepted
n, m = map(int, input().split())
h = list(map(int, input().split()))
ab = [list(map(int, input().split())) for _ in range(m)]

x = [set() for _ in range(n)]
for a, b in ab:
    x[a-1].add(b-1)
    x[b-1].add(a-1)
    
ans = 0
for i, xx in enumerate(x):
    for xxx in xx:
        if h[i] <= h[xxx]:
            break
    else:
        ans += 1
        
print(ans)
# Judge status: Accepted
def main():
    N = int(input())
    S = list(input())
    alpha = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
    for i in range(len(S)):
        idx = alpha.index(S[i])
        idx += N
        if idx > len(alpha) - 1:
            idx -= len(alpha)
        S[i] = alpha[idx]
    print("".join(S))
main()
# Judge status: Accepted
nums = input().split(" ")
A = int(nums[0])
B = int(nums[1])
K = int(nums[2])

"""
ここで、まずはAとKの比較を行って、Aの方が大きければその場で試行は終了
し、Kの方が大きければ、A=0となり、その差|A-K|は残りのBから引くものになる。
"""
if A >= K:
  A -= K
  print(A, end=" ")
  print(B)
else:
  K -= A
  A = 0
  B -= K
  if B < 0:
    B = 0
  print(A, end=" ")
  print(B)
# Judge status: Wrong Answer
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

X,Y,Z = I()
print(1+(X-Y)//(Y+Z))
# Judge status: Accepted
w,h,x,y=map(int, input().split())
if 2*x==w and 2*y==h:print(w*h/2,1)
else:print(w*h/2,0)
# Judge status: Accepted
n,m = map(int,input().split())
x = [int(i) for i in input().split()]
x.sort()
memo = []
for i in range(m-1):
    memo.append(x[i+1]-x[i])
memo.sort()
ans = 0
for i in range(m-n):
    ans += memo[i]
print(ans)
# Judge status: Accepted
a,b,x=map(int,input().split())
print("YES" if a<=x and x<=a+b else "NO" )
# Judge status: Accepted
n,l=map(int,input().split())
t=[]
tmp=0
for i in range(n):
    k=i+l
    t.append(k)
    tmp+=k
if min(t)>0:
    tmp-=min(t)
if max(t)<0:
    tmp-=max(t)
print(tmp)
# Judge status: Accepted
lis = ["Sunny", "Cloudy", "Rainy"]
S = input()
x = lis.index(S)
if x == 2:
  ans_key = 0
else:
  ans_key = x + 1
print(lis[ans_key])
# Judge status: Accepted
x = int(input())

div, mod = divmod(x, 11)

add = 0
if 0 < mod <= 6:
    add = 1
elif mod > 6:
    add = 2

print(div * 2 + add)
# Judge status: Accepted
a, b, c, d = map(int, input().split())

alice = list(range(a, b+1))
bob = list(range(c, d+1))

ans = 0
for a in alice:
    if a in bob:
        ans += 1
if ans != 0:
    print(ans - 1)
else:
    print(0)
# Judge status: Wrong Answer
#DPまとめコンテストA問題より
infinity=10**6
N = int(input())
h = list(map(int,input().split()))

dp=[infinity]*N

dp[0]=0

for i in range(N-1):
    dp[i+1] = min(dp[i+1],dp[i]+abs(h[i+1]-h[i]))
    if i>=1:
        dp[i+1] = min(dp[i+1],dp[i-1]+abs(h[i+1]-h[i-1]))

print(dp[-1])
# Judge status: Wrong Answer
a, b, x = map(int, input().split())
print("Yes" if a <= x and x <= a+b else "No")
# Judge status: Accepted
N = input()
if '7' in N:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
def resolve(n):
    def ans(n, a):
        if n == 0:
            return a
        else:
            a += n
            return ans(n-1,a)
    return ans(n, 0)

print(resolve(int(input())))
# Judge status: Accepted
S=input();N=len(S)
for i in range(len(S)):
  if(S[:i]+S[N-7+i:]=="keyence"):
    print("YES")
    exit()
print("NO")
# Judge status: Accepted
import bisect
n,m = map(int,input().split())
l = [list(map(int,input().split())) for i in range(m)]
ls = sorted(l,key=lambda x:x[1])
dict = {}
for i in ls:
    p,y = i
    if not p in dict.keys():
        dict[p] = []
        dict[p].append(y)
    else:
        dict[p].append(y)
for j in l:
    p,y = j
    print('{:0=6}'.format(p)+'{:0=6}'.format(bisect.bisect_left(dict[p],y) + 1))
# Judge status: Wrong Answer
a , b =(map(int , input().split()))

if a==1:
  a=a+13

if b==1:
  b=b+13
  
if a>b :
  print("Alice")

elif b<a:
  print("Bob")

else:
  print("Draw")
# Judge status: Accepted
n=input()
if n=='a' or n=='i' or n=='u' or n=='e' or n=='o':
    print('vowel')
else:
    print('consonant')
# Judge status: Wrong Answer
import math
n,k = map(int,input().split())
a = list(map(int,input().split()))
pos = a.index(1)+1
right = n-pos
left = pos-1
ans = 0
print(left,right)
if n == k:
    print(1)
    exit()
if right < k-1:
    right = 0
    left = n-k
    ans = 1
elif left < k-1:
    left = 0
    right = k
    ans = 1
print(math.ceil(right/(k-1)) + math.ceil(left/(k-1))+ans)
# Judge status: Wrong Answer
#--------------------------------------------
#ライブラリ呼び出し
import sys
import math
#--------------------------------------------
D, N = map(int, input().split())

if N ==100:
    N=101

ans=100**D
print(N*ans)
# Judge status: Accepted
N = int(input())
s, t = input(), input()

v = 0
for i in range(len(s)):
    # print(s[-(i + 1):], t[:i + 1])
    if s[-(i + 1):] == t[:i + 1]:
        v = i + 1
# print('v', v)
ans = N * 2 - v
print(ans)
# Judge status: Accepted
s = input()
a = s.replace('hi', '')
if len(a)==0:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
N = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(len(a)):
    if a[i] % 2 == 1:
        if (i + 1) % 2 == 1:
            count += 1
print(count)
# Judge status: Accepted
K=int(input())
g=K//2
k=K-g
print(g*k)
# Judge status: Accepted

def myAnswer(N:int)->int:
   K = len(str(N)) #桁数
   if(K == 1):return N
   c = N // 10**(K-1) #最上位の桁の数
   if((c*10**(K-1) + int("9"*(K-1)))<= N):
      return c + 9 *(K - 1)
   else:
      return c + 9 *(K - 1) -1 


def modelAnswer():
   tmp=1
def main():
   N = int(input())
   print(myAnswer(N))

if __name__ == '__main__':
   main()
# Judge status: Accepted
x, y = map(int, input().split())
a = [1, 3, 5, 7, 8, 10, 12]
b = [4, 6, 9, 11]
c = [2]

if (x in a and y in a) or (x in b and y in b) or (x in c and y in c):
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer

N, M, Q = map(int, input().split())
X = [list(map(int, input().split())) for _ in range(Q)]


def dfs(x):
    if len(x) == N:
        res = 0
        for a, b, c, d in X:
            if x[b - 1] - x[a - 1] == c:
                res += d
        return res

    res = 0
    for i in range(1, M + 1):
        x.append(i)
        res = max(res, dfs(x))
        x.pop()

    return res


print(dfs([]))
# Judge status: Accepted
s,t=input().split()
a,b=map(int,input().split())
u=input()

if u==s:
    print(a-1,b)
else:
    print(a,b-1)
# Judge status: Accepted
n, a, b = map(int, input().split())
line = n // (a + b)
remain = n % (a + b)

ans = line * a
ans += min(a, remain)

print(ans)
# Judge status: Accepted
N,C,K=map(int,input().split())
T=[int(input())for i in range(N)]
T.sort()
ans=0
bus_seat=0
tmp_time=0
for i in range(len(T)):
    if T[i]>tmp_time+K:
        bus_seat=0
    if bus_seat==0:
        ans+=1
        tmp_time=T[i]
    
    bus_seat+=1
    if bus_seat==C:
        bus_seat=0
print(ans)
# Judge status: Wrong Answer
n = int(input())

answer = 0
for i in range(1,n):
  if (i**2) > n:
    answer = (i-1)**2
    break

print(answer)
# Judge status: Wrong Answer
import math

def pushpush(n , a):

    ans = [a[i] for i in range(0 , n , 2)]
    ansb = [a[i] for i in range(1 , n , 2)]

    if n % 2 == 0:
        return ansb[::-1] + ans
    else:
        return ans[::-1] + ansb[::-1]

def main():
    n = int(input())
    a = list(map(int , input().split()))
    print(*pushpush(n , a))

if __name__ == '__main__':
    main()
# Judge status: Accepted
s = input()
print(chr(ord(s) + 1))
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
tmp=1
if n==2:
    if a[0]*a[1]%4==0:
        print('Yes')
        exit()
    else:
        print('No')
        exit()
for i in range(n):
    tmp*=a[i]
if tmp%(4**(n-2))==0:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import sys
input = sys.stdin.buffer.readline
import math

def main():
    N = int(input())
    num = ((1+8*N)**(1/2)-1)/2
    print(math.ceil(num))

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
n=int(input())
v=[int(input()) for i in range(n)]
m1=m2=v[0]
for i in v:
  if i > m1:
    m2=m1
    m1=i
  elif i>m2:
    m2=i
for i in v:
  print(m2 if i==m1 else m1)
# Judge status: Accepted
H,A=map(int,input().split())
count = 0
while H > 0:
  count+=1
  H -= A
print(count)
# Judge status: Accepted
N,M = map(int,input().split())
dp = [[0]*(M+1) for _ in range(N+1)]

for i in range(1, N+1):
    W,V = map(int,input().split())
    for j in range(W):
        dp[i][j] = dp[i-1][j]
    for j in range(M-W+1):
        dp[i][j+W] = max(dp[i-1][j+W],dp[i-1][j]+V)

print(max(dp[-1]))
# Judge status: Wrong Answer
A, B, C, D = map(int, input().split())
count = 0
for i in range(A,B):
    if i%C!=0 and i%D!=0:
        count += 1
print(count)
# Judge status: Accepted
N = int(input())
cnt = 0
for i in range(1, N+1):
    if len(str(i)) % 2 == 1:
        cnt += 1

print(cnt)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))

left = 0
right = 0
center = 0
sum_a = sum(a)
flg = False
for i in range(n):
    if left + a[i] > sum_a/2 and flg is False:
        flg = True
        center = a[i]
        right -= a[i]
    elif left + a[i] == sum_a // 2:
        print(0)
        exit()
    if flg is False:
        left += a[i]
    else:
        right += a[i]

print(min(left+center-right, right+center-left))
# Judge status: Wrong Answer
data = input()

dataa,datab,datac,datad = data.split(' ')

dataa = int(dataa)
datab = int(datab)
datac = int(datac)
datad = int(datad)

length1 = dataa -datab + datab - datac
length2 = dataa - datac

if length1 < datad:
    print('Yes')
elif length2 < datad:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import sys
input = sys.stdin.readline
n = int(input().strip())
t = 0
x = 0
y = 0
ans = "Yes"
for _ in range(n):
  tn,xn,yn = map(int,input().split())
  if tn%2 != (xn+yn)%2 or abs(xn-x)+abs(yn-y) > (tn - t):
    ans = "No"
    break
print(ans)
# Judge status: Wrong Answer
hw = list(map(int, input().split()))

if hw[0] % 2 == 0 and hw[1] % 2 == 0:
    count = hw[0] * hw[1] // 2
elif hw[0] % 2 != 0 and hw[1] % 2 == 0:
    count = (hw[0] + 1) * hw[1] // 2 - hw[1] // 2
elif hw[0] % 2 == 0 and hw[1] % 2 != 0:
    count = (hw[1] + 1) * hw[0] // 2 - hw[0] // 2
else:
    count = (hw[0] + 1) * (hw[1] + 1) // 2 - (hw[0] // 2 + 1) - (hw[1] // 2 + 1) + 1
print(count)
# Judge status: Accepted
import itertools
a = int(input())
e = range(1, a + 1, 1)
b = list(itertools.combinations(e, 2))
for i, item in enumerate(b):
    if sum(x % 2 == 0 for x in item) != 1:
        del b[i]
    elif sum(x % 2 != 0 for x in item) != 1:
        del b[i]
print(len(b))
# Judge status: Accepted
N, K, Q = map(int, input().split())
val = [K]*N
for i in range(Q):
    val[int(input())-1] += 1

for i in val:
    if i - Q <= 0:
        print('No')
    else:
        print('Yes')
# Judge status: Accepted
# -*- coding: utf-8 -*-
a = int(input())
b = set()
for i in range(a):
	b ^= {input()}
print(len(b))
# Judge status: Accepted
n=input()
num=0
for i in n:
  num+=int(i)

print('Yes' if num%9==0 else 'No')
# Judge status: Accepted
n = int(input())
if n<1000:
  print("ABC")
else:
  print("ABD")
# Judge status: Accepted
n=int(input())
alpha=[chr(i) for i in range(97,97+26)]
def test(x,t):
  if x//t>0:
    return test(x//t-1,t)+alpha[x%t]
  return alpha[x%t]
print(test(n-1,26))
# Judge status: Wrong Answer
def calc():
    ans = r*100 + g*10 + b
    
    if ans%4 == 0:
        return "YES"
    
    else:
        return "NO"
 
r, g, b = map(int, input().split())
print(calc)
# Judge status: Accepted
S = input()

for i in range(len(S)):
  if S[i] == 'A':
    top = i
    break
    
for j in reversed(range(len(S))):
  if S[j] == 'Z':
    tail = j
    break
    
print(j-i+1)
# Judge status: Wrong Answer
List = input().split()

print(List)
if List.count("5") == 2 and List.count("7") == 1:
    print("Yes")
else: print("No")
# Judge status: Accepted
K = input()
K = int(K)

tmp = 0
while True:
	tmp += (K // 2)
	K = K - 1
	if (K == 0):
		break

print(tmp)
# Judge status: Accepted
import statistics
N = int(input())
L = input().split()
A = sorted(int(L[X])-(X+1) for X in range(0,N))
B = int(statistics.median(A))
Disp = sum(abs(A[X]-B) for X in range(0,N))
print(Disp)
# Judge status: Accepted
# -*- coding: utf-8 -*-

N = int(input().strip())

if N == 0:
    ans_list=[0]
else:
    ans_list=[]

while N != 0:
    digit1 = abs( N%(-2) )
    ans_list += [digit1]
    N = (N - digit1) // (-2)
    
print( *ans_list[::-1], sep="" )
# Judge status: Accepted
N = int(input())

f = {}
p = 2
while p*p<=N:
    if N%p==0: f[p]=0
    while N%p==0:
        N//=p
        f[p]+=1
    p+=1

if N>1: f[N]=1

ans = 0
for v in f.values():
    n = s = 0
    while s<=v:
        n+=1
        s+=n
    ans += n-1

print(ans)
# Judge status: Accepted
from collections import Counter

s=input()
t=input()

cs=Counter(s)
ct=Counter(t)

print('Yes' if sorted(cs.values())==sorted(ct.values()) else 'No')
# Judge status: Accepted
lr=list(map(int,input().split()))
mod=2019
ans=mod**2
if lr[0]%mod<=lr[1]%mod and lr[1]-lr[0]<mod:
    for i in range(lr[0],lr[1]+1):
        for j in range(i+1,lr[1]+1):
            if i*j%mod<ans:
                ans=i*j%mod
else:
    ans=0
print(ans)
# Judge status: Wrong Answer
#!/usr/bin/env python
# -*- coding: utf-8 -*-

n = int(input())
a_list = list(map(int, input().split()))


while True:
    try:
        a = a_list.pop()
    except IndexError:
        print("Yes")
        exit()

    if a in a_list:
        print("No")
        exit()
# Judge status: Accepted
def resolve():
    h, w = map(int, input().split())
    dy = h // 2 if h != 1 else 1
    if h == 1 or w == 1:
        count = 1
    elif h % 2 == 1:
        count = w * dy + (w - (w // 2))
    else:
        count = w * dy

    print(count)


if __name__ == '__main__':
    resolve()
# Judge status: Accepted
s = list(input())
s.sort()
print("Yes" if s[0] == s[1] and s[2] == s[3] and s[0] != s[2] else "No")
# Judge status: Accepted
N = int(input())
S = input()

b = 0
e = 0
for s in S:
    if s == ')':
        e += 1
    else:
        b += 1
    S = '(' * max(e-b, 0) + S
    b += max(e-b, 0)
S += ')' * max(b-e, 0)
print(S)
# Judge status: Wrong Answer
def main():
    S = input()
    K = int(input())
    idx = 0
    num = ""

    all_one = True
    for i in range(len(S)):
        idx = i
        num = S[i]

        if S[i] != "1":
            all_one = False
            break

    if all_one == True:
        print("1")
    else:
        if idx >= K - 1:
            print("1")
        else:
            print(num)

if __name__ == "__main__":
    main()
# Judge status: Accepted
from collections import defaultdict
from heapq import heappush, heappop

N, M = list(map(int, input().split()))
jobs = defaultdict(list)
heap = []
ans = 0
for _ in range(N):
    a, b = list(map(int, input().split()))
    if a <= M:
        jobs[a].append(b)

for m in range(1, M+1):
    for b in jobs[m]:
        heappush(heap, -b)
    if heap:
        maxb = -heappop(heap)
        ans += maxb
print(ans)
# Judge status: Accepted
S = input()
ans = [0]*(len(S)+1)

for i in range(len(S)):
    if S[i] =='<':
        ans[i+1] = ans[i]+1
        
for i in range(len(S)-1,-1,-1):
    if S[i]=='>':
        ans[i]= max(ans[i],ans[i+1]+1)
print(sum(ans))
# Judge status: Accepted
N = int(input())
char = ["a","b","c","d","e","f","g","h","i","j"]
pre = [("",0)]
for i in range(N):
    nx = []
    for s,cnt in pre:
        for c in char[:cnt]:
            nx.append((s+c,cnt))
        c = char[cnt]
        nx.append((s+c,cnt+1))
    pre = nx

for s,_ in pre:
    print(s)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

A.sort()

maxnum = A[-1]
checklist = [True]*(maxnum+1)
before = 0

for a in A:
    if before == a:
        checklist[a] = False
        continue
    num = 2
    while num * a <= maxnum:
        checklist[a * num] = False
        num += 1
    before = a

ans = 0
for i in A:
    ans += checklist[i]
print(ans)