peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))
mod = 10**9+7
S = sum(A)**2
SS = 0

for i in range(N):
    SS += A[i]**2

print(((S - SS)//2)%mod)
# Judge status: Accepted
A,B = [int(i) for i in input().split()]
S = input()
try:
    if len(S) != A + B + 1:
        int("a")
    int(S[:A] + S[A+1:])
    if S[A] != "-":
        int("b")
    print("Yes")
except:
    print("No")
# Judge status: Accepted
a,b,k = map(int,input().split())
if a>=k:
    print(a-k,b)
else:
    print(0,max(0,a+b-k))
# Judge status: Accepted
a, b, h = map(int, open(0).read().split())
print((a + b) * h // 2)
# Judge status: Accepted
n = int(input())
mod = 10**9 + 7

ans = pow(10,n,mod)
ans -= pow(9,n,mod)*2
ans += pow(8,n,mod)

print(ans%mod)
# Judge status: Accepted
st = input().split(" ")
ab = input().split(" ")
ab[0] = int(ab[0])
ab[1] = int(ab[1])
u = input()

if st[0] == u:
    ab[0] -= 1
else:
    ab[1] -= 1

print(str(ab[0]) + " " + str(ab[1]))
# Judge status: Accepted
a, b = map(int, input().split())
print((a + b) % 24)
# Judge status: Accepted
n = int(input())
list_x = list(map(int, input().split()))

def cost_calc(list_x, p):
  cost = 0
  for x in list_x:
    cost += (x - p)**2
  return cost

cost = 10**20
for _ in range(min(list_x),max(list_x)+1):
  tmp = cost_calc(list_x, _)
  if tmp < cost:
    cost = tmp
print(cost)
# Judge status: Accepted
s = input()

out = ''
for _ in range(len(s)):
    out += 'x'

print(out)
# Judge status: Wrong Answer
n = input()
n = ord(n)
n += 1
# Judge status: Wrong Answer
import math

n,d = map(int,input().split())
cou = 0

for i in range(n):
  a,b = map(int,input().split())
  dis = math.sqrt(a*a+b*b)
  if dis < d:
    cou +=1
 
print(cou)
# Judge status: Accepted
N = int(input())
ans = 1
for i in range(2, N+1):
  ans *= i % 1000000007
  ans = ans % 1000000007
print(ans % 1000000007)
# Judge status: Accepted
A1,A2,A3 = map(int,input().split(" "))
if A1 + A2 + A3 >= 22:
    print("bust")
else:
    print("win")
# Judge status: Accepted
D = int(input())

for i in range(D):
    print(1)
# Judge status: Wrong Answer
s = input() 
if s[-1]=="0" or s[-1]=="1" or s[-1]=="6" or s[-1]=="8":
    print("pon")
    
elif s[-1]==3:
    print("bon")
    
else:
    print("hon")
# Judge status: Accepted
N,A,B = map(int,input().split())
MOD = 10**9+7
p = pow(2,N,MOD)

MAXN = B+3
inv = [0,1] + [0]*MAXN
for i in range(2,MAXN+2):
    inv[i] = -inv[MOD%i] * (MOD // i) % MOD

def comb(n,r):
    ret = 1
    for i in range(r):
        ret *= n-i
        ret *= inv[i+1]
        ret %= MOD
    return ret
ans = p-1 - comb(N,A) - comb(N,B)
ans %= MOD
print(ans)
# Judge status: Wrong Answer
from sys import stdin
def ip(): return [int(i) for i in stdin.readline().split()]
def sp(): return [str(i) for i in stdin.readline().split()]


def solve(x,k,d):
    di = int(x//d)
    if di >= k: 
        return x - (k*d)
    x = x - (di*d)
    k = di
    if k % 2 == 0:
        return x
    else:
        return abs(x - d)

x,k,d = ip()
print(solve(x,k,d))
# Judge status: Accepted
import sys
h, n = map(int, input().split())
# A = [0] * n
# B = [0] * n
# for i in range(n):
#     A[i], B[i] = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(n)]
min_hp = h
max_hp = h + max(a for a, b in (AB))

dp = [sys.maxsize] * (max_hp + 1)
dp[0] = 0

for i in range(1, max_hp + 1):
    # dp[i] = min(dp[i - A[j]] + B[j] for j in range(n))
    dp[i] = min(dp[i - a] + b for a, b in AB)
print(min(dp[h:]))
# Judge status: Wrong Answer
if __name__ == "__main__":
    S = input()
    word_arr = ["A","T","G","C"]
    max_count,count = 0,0
    for c in S:
        if c in word_arr:
            count += 1
        else:
            max_count = max(count,max_count)
            count = 0
    print(max_count)
# Judge status: Wrong Answer
r = int(input())

print(r * 3.141592)
# Judge status: Wrong Answer
def calc_dist(x1, x2):
    return abs(x1[0]-x2[0]) + abs(x1[1]-x2[1])


def main():

    N = int(input())
    G = []
    for i in range(N):
        G.append(list(map(int, input().split())))
    G1 = sorted(G, key=lambda x:x[0])
    G2 = sorted(G, key=lambda x:x[1])
    print(max((calc_dist(G1[0], G2[0]), calc_dist(G1[1], G2[0]), calc_dist(G1[0], G2[1]), calc_dist(G1[1], G2[1]))))
    
    
if __name__ == '__main__':
    main()
# Judge status: Accepted
N, K, S=map(int, input().split())
Ans=[]

for i in range(K):
    Ans.append(S)

if S!=10**9:
    for i in range(N-K):
        Ans.append(S+1)
else: 
    for i in range(N-K):
        Ans.append(1)
 
print(*Ans)
# Judge status: Accepted
s = input()
o = ['R','U','D']
e = ['L','U','D']
ans = 'Yes'
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] not in o:
            ans = 'No'
    else:
        if s[i] not in e:
            ans = 'No'
print(ans)
# Judge status: Wrong Answer
s = input()
if int(s[-1]) in [2,4,5,7,9]:
    print('hon')
elif int(s[-1]) in [0, 1, 6, 9]:
    print('pon')
else:
    print('bon')
# Judge status: Accepted
import itertools
n = int(input())
xy = [tuple(map(int, input().split())) for _ in range(n)]

way = 0
p_list = [i for i in range(n)]
for P in itertools.permutations(p_list):
    for i in range(n-1):
        way += ((xy[P[i+1]][1]-xy[P[i]][1])**2+(xy[P[i+1]][0]-xy[P[i]][0])**2)**0.5

kai = 1
for i in range(n):
    kai *= (i+1)

print(way/kai)
# Judge status: Accepted
print("Yes" if 2==len(set(list(map(int,input().split())))) else "No")
# Judge status: Accepted
w,h,x,y=map(int,input().split())

if w/2==x and h/2==y:
    print(0.5*h*w,1)
else:
    print(0.5*h*w,0)
# Judge status: Accepted
n = int(input())

if n % 10 == 3:
    print("bon")

elif n % 10 in [0,1,6,8]:
    print("pon")
    
else:
    print("hon")
# Judge status: Accepted
l=list(map(int,list(input())))

for i in range(2**3):
    count=l[0]
    s=str(l[0])
    for j in range(3):
        if i&(2**j):
            count+=l[j+1]
            s=s+'+'+str(l[j+1])
        else:
            count-=l[j+1]
            s=s+'-'+str(l[j+1])
    if count==7:
        print(s+'=7')
        exit()
# Judge status: Accepted
n = int(input())
w = list(map(int, input().split()))

ans = float('inf')

s1 = 0
s2 = 0

for i in range(n):
    s2 += w[i]

for i in range(n-1):
    s1 += w[i]
    s2 -= w[i]
    sa = abs(s1-s2)
    ans = min(sa, ans)

print(ans)
# Judge status: Accepted
A, B, C = map(int, input().split())
print('Yes' if sum([A,B])>=C else 'No')
# Judge status: Wrong Answer
s = list(input().split())[1]
print("A"+s+"C")
# Judge status: Accepted
S=input()
ans=0
length=0
for c in S:
    if (c == 'A' or c == 'G' or c == 'C' or c == 'T'):
        length += 1
        if length > ans:
            ans = length
    else:
        length = 0

print(ans)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int,input().split()))
b = [0]*n

for i in range(n)[::-1]:
    cnt = sum(a[i::i+1])
    b[i] = cnt%2

c = 0
for i in b:
    if i != 0:
        c += 1

print(c)
str_b = []
for i in reversed(b):
    if i != 0:
        str_b.append(str(i))
print(' '.join(str_b))
# Judge status: Accepted
N=int(input())
a=sorted(int(x)-i-1 for i,x in enumerate(input().split()))
print(sum(abs(j-a[N//2]) for j in a))
# Judge status: Wrong Answer
N = int(input())
a = list(map(int,input().split()))
A = a.sort()
array = list(set(a))
array.sort()
sum = 0
n = 0
for i in range(len(array)):
    cnt = 0
    for j in range(n,len(a)):
        if array[i] == a[j]:
            cnt += 1
        else:
            break
    n += cnt
    print(cnt,array[i])
    if cnt >= array[i]:
        sum += cnt - array[i]
    else:
        sum += cnt
print(sum)
# Judge status: Accepted
N, K, S = map(int, input().split())

if S >= 2 * 10 ** 6:
  s = 1
else:
  s = 10 ** 9
  
answer = [S] * K + [s] * (N - K)
print(*answer)
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    n,x=map(int, input().split())
    l=list(map(int,input().split()))
    if n==1:
        print(abs(l[0]-x))
    else:
        l.append(x)
        l.sort()
        S=[]
        for i in range(n):
            S.append(l[i+1]-l[i])
        from functools import reduce
        from fractions import gcd
        print(reduce(gcd,S))
resolve()
# Judge status: Accepted
n=int(input())
sm=0
for i in range(3,n+1,2):
    num=0
    for j in range(1,i+1,2):
        if i%j==0:num+=1
    if num==8: sm+=1
print(sm)
# Judge status: Accepted
k, x = map(int, input().split())
for i in range(-k + 1, k):
  print(x + i, end=" ")
# Judge status: Accepted
N,A,B = map(int,input().split())


if A > B:
    print(0)
else:
    if N == 1:
        if A != B:
            print(0)
        else:
            print(1)
    else:
        print((B-A)*(N-2)+1)
# Judge status: Accepted
n, m = map(int, input().split())
if m == 1:
    print(1, 2)
    exit()
l1 = 1
l2 = m + 2
f = True
for length in range(m, 0, -1):
    if f:
        print(l1, l1 + length)
        l1 += 1
        f = not f
    else:
        print(l2, l2 + length)
        l2 += 1
        f = not f
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-
N,R = map(int, input().split())
if N < 10:
	R = R - 100 * (10 - N )
     
print(R)
# Judge status: Wrong Answer
n = int(input())
a_list = list(map(int, input().split()))
print(a_list)

a_list.sort(reverse = True)
alice_sum = 0
bob_sum = 0
for i in range(len(a_list)):
    if i % 2 == 0:
        alice_sum += a_list[i]
    else:
        bob_sum += a_list[i]

print(alice_sum - bob_sum)
# Judge status: Accepted
a, b = map(int, input().split())

if a<=9 and b<=9:
  print(a*b)
else:
  print(-1)
# Judge status: Wrong Answer
NXT = list(map(int,input().split()))
NXT.sort()
T = NXT[0]
X = NXT[1]
N = NXT[2]
ans=0
a = N // X
if(N%X==0):
    ans=T*a
else:
    ans = T*(a+1)
print(ans)
# Judge status: Accepted
s=list(input())
K=int(input())
A=[chr(ord('a') + i) for i in range(26)]+[chr(ord('a') + i) for i in range(26)]
for i in range(len(s)):
  a=A.index(s[i])
  if i==len(s)-1:
    K%=26
    s[i]=A[a+K]
    break
  if s[i]=='a':
    continue
  if K>=26-a:
    K-=(26-a)
    s[i]='a'
  else:
    continue
print(*s,sep='')
# Judge status: Accepted
k,x = map(int,input().split())
result = 0
for i in range(k):
    result += 500

if result >= x:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
N, M, X, Y = [int(i) for i in input().split()]
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]

max_x = max(x)
min_y = min(y)
z = [i for i in range(-100, 101) if X < i <= Y and max_x < i <= min_y]
if z:
    print("No War")
else:
    print("War")
# Judge status: Accepted
n=int(input())
print(n*800-200*(n//15))
# Judge status: Accepted
N, M = list(map(int, input().split()))
s = 10**9+7
a = 1

if abs(N-M)>=2:
    print(0)
else:
    if abs(N-M):
        for i in range(1, min(N,M)+1):
            a = (a * i) % s
        b = (a * max(N,M)) % s
        print((a * b) % s)
    else:
        for i in range(1, N+1):
            a = (a * i) % s
        c = (a * a) % s
        print((c * 2) % s)
# Judge status: Accepted
K,S=map(int,input().split())
ans=0
for i in range(K+1):
    for j in range(K+1):
        if  0<=S-i-j<=K:
            ans+=1

print(ans)
# Judge status: Accepted
N = int(input())
S = str(input())

if N%2 == 1:
    print("No")
elif S[:int(N/2)] == S[int(N/2):]:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
from math import factorial
n, m = [int(x) for x in input().split()]
temp = abs(n - m)
if temp > 1:
    print(0)
    exit()
mod = 10 ** 9 + 7
f_n = factorial(n) % mod
f_m = factorial(m) % mod
ans = f_n * f_m % mod
if temp == 0:
    ans = ans * 2 % mod
print(ans)
# Judge status: Wrong Answer
#N,K = map(int,input().split())
N=int(input())
if N%2==0:
    print(N/2)
else:
    print(N//2+1)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
print("Yes") if a+b<=c else print("No")
# Judge status: Accepted
N = int(input())
S = input()

i = S[1:].count('E')
r = [i]

for n in range(1, N):
    if S[n] == 'E':
        i -= 1

    if S[n - 1] == 'W':
        i += 1
    r.append(i)

print(min(r))
# Judge status: Accepted
alist=[105,135,165,189,195]
ans=0
n=int(input())
for i in alist:
  if n>=i:
    ans+=1
print(ans)
# Judge status: Accepted
n, k = list(map(int, input().split()))
P = list(map(int, input().split()))
E = [0, ]
tot = 0
for i in range(n):
    tot += P[i] * (P[i] + 1) / (2 * P[i])
    E.append(tot)
ans = 0
for i in range(n - k + 1):
    ans = max(ans, E[i + k] - E[i])
print(ans)
# Judge status: Accepted
n = int(input())
x = list(map(int,input().split()))

lis = sorted(x)
median = lis[int(n/2)]
median2 = lis[int((n-2)/2)]

for i in range(n):
    if x[i] < median:
        print(median)
    else:
        print(median2)
# Judge status: Wrong Answer
n = int(input())
As = [int(x) for x in input().split()]
print(sum(As) - min(As))
# Judge status: Wrong Answer
import bisect
n=int(input())
a=[0]+sorted(list(map(int,input().split())))
x=a[-1]
i=bisect.bisect_left(a,x//2)
y=[a[i-1],a[i]][abs(a[i]-x)<abs(a[i-1]-x)]
print(x,y)
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))
c = 0
d = 0
for i in A:
    if i % 4 == 0:
        c += 1
    elif i % 2 == 0:
        d += 1
if d > 0:
    if c >= n-c-d : print("Yes")
    else: print("No")
else:
    if c >= n//2: print("Yes")
    else: print("No")
# Judge status: Accepted
X=int(input())

ns=X//105
ne=X//100


ans=0
for i in range(ns, ne+1):
    if 100*i<=X<=100*i+5*i:
        ans=1
        break
print(ans)
# Judge status: Accepted
N = int(input())
X = list(map(int,input().split()))

for p in range(1,101):
    total = 0
    for i in range(N):
        total += (X[i] - p) ** 2
    if p == 1:
        result = total
    elif total < result:
        result = total
print(result)
# Judge status: Accepted
n, k = map(int, input().split())
x = list(map(int, input().split()))
start = 0 # i-1本目とi本目の間に0がある

ans = 10**9
for i in range(n-k+1):
    tmp_ans = min(
        abs(x[i]) + abs(x[i+k-1]-x[i]),
        abs(x[i+k-1]) + abs(x[i+k-1]-x[i])
    )
    if tmp_ans < ans:
        ans = tmp_ans

print(ans)
# Judge status: Accepted
# -*- coding: utf-8 -*-

n, m=  [int(i) for i in input().split()]
for i in range(0,m):
  if n-2*i-1>n/2 or n%2==1:
    print(i+1,n-i)
  else:
    print(i+1,n-i-1)
# Judge status: Accepted
num = int(input())

def num_divisors_table(n):
    table = [0] * (n + 1)
    
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            table[j] += 1
    
    return table
  
cnt = 0

print(sum(num_divisors_table(num)[:-1]))
# Judge status: Wrong Answer
Z = list(map(int,input().split()))
c=[]
for i in range(1,101):
  c.append([i*0.08//1,i*0.1//1])

print(c.index(Z)+1 if Z in c else -1)
# Judge status: Accepted
n=int(input())
s=input()
if s[:n//2] == s[n//2:]:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
N, A, B = map(int, input().split())
n = int(N / (A + B))
m = min(N - n * (A + B), A)
print(n * A + m)
# Judge status: Accepted
n,m,x=map(int,input().split())
ca = [list(map(int,input().split())) for _ in range(n)]

ans = 1234567890123

for bit in range(1<<n):
    syu = [0]*m
    cost = 0
    for i in range(n):
        if (bit>>i)&1:
            cost += ca[i][0]
            for j in range(1,m+1):
                syu[j-1] += ca[i][j]
    ok = True
    if not False in list(map(lambda a: a >= x,syu)):
        ans = min(ans,cost)
print(ans if ans != 1234567890123 else -1)
# Judge status: Accepted
n, k = map(int, input().split())
s = input()
k -= 1

ans = s[:k] + s[k].lower() + s[k + 1:]
print(ans)
# Judge status: Wrong Answer
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

ans = 0
ans += B[A[0]-1]
for i in range(1,len(A)):
  ans += B[A[i]-1]
  if A[i] == A[i-1]+1:
    ans += C[i-1]
    
print(ans)
# Judge status: Accepted
n = int(input())
t,a = tuple(map(int,input().split()))
h = tuple(map(int,input().split()))
ans = n
m = abs(t-h[-1]*0.006-a)
for i in range(n-1):
  t_i = t-h[i]*0.006
  diff = abs(t_i-a)
  m = min(diff,m)
  if m==diff:
    ans = i+1
print(ans)
# Judge status: Accepted
N = int(input())
S = input()

flg = True
if N % 2 != 0:
    flg = False

for i in range(N//2):
    if S[i] != S[i + N//2]:
        flg = False

if flg:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
val = input().split(' ')
s = val[0]
t = val[1]

val = input().split(' ')
a = int(val[0])
b = int(val[1])

u = input()

if s == u:
    a -= 1
elif t == u:
    b -= 1

print("{} {}".format(a, b))
# Judge status: Accepted
N = int(input())
H = list(map(int, input().split()))

ans = 'Yes'
H_floor = 0
for h in H:
    if h - H_floor < 0:
        ans = 'No'
        break
    else:
        H_floor = max(H_floor, h - 1) 
        
print(ans)
# Judge status: Accepted
a, b, x = map(int, input().split())

A = -((-a) // x)
B = b // x
print(B - A + 1)
# Judge status: Accepted
import math
 
k=int(input())
ans=0
for i in range(1,k+1):
    for j in range(1,k+1):
        for l in range(1,k+1):
            ans+=(math.gcd(i,math.gcd(j,l)))
print(ans)
# Judge status: Accepted
#!/usr/local/bin/python3
# https://atcoder.jp/contests/abc065/tasks/abc065_b

N = int(input())
a = [int(input())-1 for _ in range(N)]
ans = 0
cur = 0

visit = [-1] * N
while True:
    # print(cur, visit)
    cur = a[cur]
    ans += 1
    if visit[cur] == -1:
        visit[cur] = ans
    else:
        print(-1)
        exit()
    if cur == 1:
        print(ans)
        exit()
# Judge status: Accepted
s = input()
s_len = len(s)
li = [0]*(s_len+1)
for i in range(0,s_len):
    if s[i] == "<":
        if li[i] >= li[i+1]:
            li[i+1] = li[i] + 1
for i in range(s_len-1,-1,-1):
    if s[i] == ">":
        if li[i] <= li[i+1]:
            li[i] = li[i+1]+1
print(sum(li))
# Judge status: Wrong Answer

a,b,k = map(int, input().split())

print(a,b,k)

if a>=k:
    print(a-k,b)
elif k>=a+b:
    print(0,0)
else:
    print(0,b-(k-a))
# Judge status: Accepted
n = int(input())
s = input()
e = s.count('E')
w = s.count('W')
ans = 1000000
e_counter = 0
w_counter = 0
for i in range(len(s)):
    if s[i] == 'E':
        e_counter += 1
    else:
        w_counter += 1
    d = w_counter
    if s[i] == 'W':
        d -= 1
    ans1 = d + (e - e_counter)
    ans = min(ans1, ans)
print(ans)
# Judge status: Accepted
n, k = map(int, input().split())
h = list(map(int, input().split()))

if k >= n:
    print(0)
    exit()
h.sort()
print(sum(h[:n - k]))
# Judge status: Wrong Answer
ans = 0
for i in range(3):
  k = list(map(int,input().split()))
  ans += sum(k)
if ans%3 == 0:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
a, b = [int(i) for i in input().split()]
if a == b:
  print("AC")
else:
  print("WA")
# Judge status: Accepted
N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = input()


def scr(inp):
	if inp == 'r':
		return P
	elif inp == 'p':
		return S
	else:
		return R


Score = 0
for i in range(N):
	if i >= K and T[i] == T[i-K]:
		if T[i-K] == 'z':
			Score += scr(T[i])
		else:
			T = T[:i] + 'z' + T[i + 1:]
	else:
		Score += scr(T[i])

print(Score)
# Judge status: Accepted
s = input()
x = int(s[:2])
y = int(s[2:])
if 1 <= x <= 12 and 1 <= y <= 12:
    a = "AMBIGUOUS"
elif 1 <= x <= 12:
    a = "MMYY"
elif 1 <= y <= 12:
    a = "YYMM"
else:
    a = "NA"
print(a)
# Judge status: Accepted
x,y=map(int,input().split())

ans=abs(abs(x)-abs(y))

if y<x<0 or 0<y<x:
    ans+=2

elif y<x or x<0<y:
    ans+=1

print(ans)
# Judge status: Wrong Answer
S = input()
if S[0] != S[1] and S[0] != S[2]:
    print("Yes")
elif S[0] != S[1] and S[1] != S[2]:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
s=input()
n=len(s)
minnum=100000
for i in range(n-2):
    check=s[i:i+3]
    print(check)
    check=abs(753-int(check))
    minnum=min(minnum,check)
print(minnum)
# Judge status: Accepted
O = input()
E = input()
for i in range(len(O)):
    print(O[i], end = "")
    if i+1 <= len(E):
        print(E[i], end = "")
# Judge status: Accepted
N,K = map(int,input().split())

# from scipy.special import comb
# a = comb(n, r)

MOD = 10**9 + 7
ans = 0
for k in range(K,N+2):
    # print(k)
    right = (N+N-k+1)*k // 2
    left = (k-1)*k // 2 
    ans += right - left + 1
    ans %= MOD
    # print(ans)
    # ans += comb(N+1, k, exact=True)
    # print(ans)


print(ans)
# Judge status: Accepted
S = input()
T = input()
String1 = list(S)
String2 = list(T)
N = len(String1)



for i in range(1,N):
    if String1 == String2:
        print("Yes")
        break
    Ex = String1.pop()
    String1.insert(0,Ex)
    if String1 == String2:
        print("Yes")
        break
else:
    print("No")
# Judge status: Accepted
import math
K=int(input())
print(int(K/2)*math.ceil(K/2))
# Judge status: Accepted
s = input()
n = len(s)
red = sum([ 1 for i in s if i == '0' ])
blue = n - red
print(n-abs(red-blue))
# Judge status: Accepted
n = int(input())
ans = 0
a = [int(input()) for _ in range(n)]
for i in range(n-1):
    if a[i] >= 2:
        ans += a[i]//2
        a[i+1] += a[i] % 2
print(ans+a[-1]//2)
# Judge status: Accepted
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v > w:
    print("YES" if abs(a - b) / (v - w) <= t else "NO")
elif w > v:
    print("NO")
else:
    print("YES" if abs(a - b) == 0 else "NO")
# Judge status: Accepted
S = []

N = int(input())
for i in range(N):
	S.append(input())

S.sort()
count = 0
max_count=0
s_max=[]
for i in range(N):
	if i==0:
		s_0 = S[i]
		s_max.append(s_0)
		continue
	s_1 = S[i]
    
	if s_0 == s_1:
		count += 1
	else:
		count = 0
      
	if max_count==count:
		max_count = count
		s_max.append(s_1)
	elif max_count < count:
		max_count = count
		s_max=[]
		s_max.append(s_1)
      
	s_0 = s_1
    

for i in s_max:
  print(i)
# Judge status: Accepted
A = list(map(int,input().split()))
a = sum(A)
if a>=22:
    print('bust')
else:
    print('win')
# Judge status: Accepted
x = input().split()
a =int(x[0])
b =int(x[1])
if (a*b) % 2:
  print("Odd")
else:
  print("Even")
# Judge status: Accepted
import numpy as np

D = int(input())
c = list(map(int, input().split()))
c = np.array(c)
S = np.zeros([D, 26], dtype=int)
for i in range(D):
  S[i, :] = list(map(int, input().split()))

T = []
last = np.zeros(26)

for i in range(D):
  score = S[i, :] + (i-last)*np.array(c)
  argmax = score.argmax()
  t = argmax+1
  last[t-1] = i
  print(t)
# Judge status: Wrong Answer
import heapq

N, M = map(int, input().split())
AB = [list(map(int, input().split())) for i in range(N)]
AB.sort()

ans = 0
candidates = []
now = 0
for i in range(M+1):
  for j in range(now, N):
    if AB[j][0] <= i:
      heapq.heappush(candidates, -AB[j][1])
      
    else:
      now = j
      break
  
  if candidates:
    ans -= heapq.heappop(candidates)

print(ans)
# Judge status: Accepted
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))

cnt = 0
s = 0

for i in range(N):
    s += A[i]

for i in range(N):
    if 4*M*A[i] < s:
        cnt += 1

print(['No', 'Yes'][N - cnt >= M])
# Judge status: Wrong Answer
[L, R, d] = [int(i) for i in input().split()]
 
print(int((R-L+1)/d))
# Judge status: Wrong Answer
a, b = map(int, input().split())

if a > 0:
    print('Positive')

elif a <= 0 and b >= 0:
    print('Zero')
    
else:
    if b - a % 2 == 0:
        print('Negative')
        
    else:
        print('Positive')
# Judge status: Accepted
w = list(input())
tmp = []
for i in w:
    if w.count(i) % 2 == 0:
        if i in tmp:
            continue
        else:
            tmp.append(i)
    else:
        print('No')
        exit()
print('Yes')
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-


def main():
    import sys
    input = sys.stdin.readline

    x = int(input())

    if x >= 1800:
        print('1')
    elif x >= 1600:
        print('2')
    elif x >= 1400:
        print('3')
    elif x >= 1200:
        print('4')
    elif x >= 1000:
        print('5')
    elif x >= 800:
        print('6')
    elif x >= 600:
        print('7')
    elif x >= 400:
        print('88888888')


if __name__ == '__main__':
    main()