peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
S = int(input())

if S <= 10**9:
    ans = [0, 0, S, 0, 0, 1]
    print(*ans)
    exit()
else:
    mod = S % (10 ** 9)
    syou = S // (10 ** 9)
    ans = [0, 0, 10 ** 9, 1, mod, syou]
    print(*ans)
# Judge status: Accepted
from sys import exit

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

if D[0] != 0:
    print(0)
    exit()

c = {}
for i in D:
    if i in c:
        c[i] += 1
    else:
        c[i] = 1

if c[0] != 1:
    print(0)
    exit()

result = 1
for i in range(1, max(D) + 1):
    if i not in c:
        print(0)
        exit()
    result = result * (c[i - 1] ** c[i]) % 998244353
print(result)
# Judge status: Accepted
n = input()

if n[1:] == "9" * (len(n) - 1) :
    num = (int(n[0])) + 9 * (len(n) - 1)
else:
    num = (int(n[0]) - 1) + 9 * (len(n) - 1)

print(num)
# Judge status: Accepted
n = int(input())
a = []
b = []
for i in range(n):
  x,y = map(int, input().split())
  a.append(x+y)
  b.append(x-y)
a.sort()
b.sort()

ans = a[-1]-a[0]
c = b[-1]-b[0]
print (max(ans,c))
# Judge status: Accepted
x = int(input())
dp = [0]*10**6
dp[0] = 1
for i in range(10**5+1000):
    if dp[i] == 1:
        for j in range(100, 106):
            dp[i+j] = 1
print(dp[x])
# Judge status: Accepted
from collections import Counter
 
 
def main():
    N = int(input())
    A = list(map(int, input().split(' ')))
    counter = Counter(A)
    searched = [0 for _ in range(10 ** 6 + 1)]
    ans = 0
    for i in range(1, 10 ** 6 + 1):
        if counter[i] == 0:
            continue
        if searched[i] == 0 and counter[i] == 1:
            ans += 1
        for j in range(1, ((10 ** 6) // i) + 1):
            searched[i * j] = 1
    print(ans)
 
 
if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
def solve(n, a):
    res = 0
    for i in range(n-1):
        if (a[i] == a[i+1]) and (a[i] % 2 == 1):
            res += a[i]
            a[i+1] = 0
        else:
            res += a[i] // 2
        a[i] = 0
    if a[-1] > 0:
        res += a[-1] // 2
    return res

n = int(input())
a = [int(input()) for i in range(n)]
print(solve(n, a))
# Judge status: Wrong Answer
n, a, b = map(int,input().split())
print(b*(n-1)+a - b+(n-1)*a+1)
# Judge status: Wrong Answer
import bisect

n = int(input())
a = list(map(int,input().split()))
a.sort()
amax = a[-1]

if amax//2 in set(a):
  print(amax,amax//2)
else:
  ind = bisect.bisect_left(a,amax//2)
  MIN = min(abs(a[ind]-(amax//2)),abs(a[ind-1]-(amax//2)))
  
  if MIN == abs(a[ind]-(amax//2)):
    print(amax,a[ind])
    exit()
  else:
    print(amax,a[ind-1])
    exit()
# Judge status: Wrong Answer
import collections
n = int(input())
a = list(map(int,input().split()))
c = collections.Counter(a)
count_4 = [i[0] for i in c.items() if i[1] >= 4]
if len(count_4) >= 1:
  max_4 = count_4[-1]
else:
  max_4 = 0
count_2 = [i[0] for i in c.items() if i[1] >= 2]
if len(count_2) >= 2:
  max_2_0 = count_2[-1]
  max_2_1 = count_2[-2]
else:
  max_2_0 = 0
  max_2_1 = 0
print(max(max_4**2, max_2_0*max_2_1))
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
b = 0
c = 0
for i in a:
    if i % 4 == 0:
        b += 1
    elif i % 2 == 0:
        c += 1
if b >= n // 2:
    print("Yes")
elif c >= (n-2*b):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n=int(input())
from itertools import *
s=[*accumulate(range(n+1))]
a=0
for i in range(1,n+1):
  a+=i*s[n//i]
print(a)
# Judge status: Accepted
from math import ceil
n, k = map(int, input().split())
_ = list(map(int, input().split()))
print(ceil((n-1)/(k-1)) if k<n else 1)
# Judge status: Accepted
n=int(input())

a=int(n%9)

if a==0:
   print("Yes")
else:
  print("No")
# Judge status: Accepted
S = list(input())

for i in S[:3]:
    print(i,end="")
print()
# print(str())
# Judge status: Wrong Answer
sx, sy, tx, ty = map(int, input().split())

res = ""
res += "U" * (ty - sy) + "R" * (tx - sx)
res += "D" * (ty - sy) + "L" * (tx - sx)

print(res)
# Judge status: Wrong Answer
a, b, k = map(int, input().split())
if k - a > 0:
    k -= a
    if b - k >= 0:
        print(0, b - k)
    else:
        print("0 0")
else:
    print(k - a, b)
# Judge status: Accepted
A, B, C = map(int, input().split())
M = max(A, B, C)
s = 3 * M - A - B - C
if s % 2 == 0:
  ans = s // 2
else:
  ans = (s + 3) // 2
print(ans)
# Judge status: Accepted
n, q = [int(i) for i in input().split()]
s = input()
l = []
r = []
for _ in range(q):
    i, k = [int(i) for i in input().split()]
    l.append(i)
    r.append(k)

cum_sum = [0]
for i in range(n-1):
    if s[i:i+2] == 'AC':
        cum_sum.append(cum_sum[-1]+1)
    else:
        cum_sum.append(cum_sum[-1])
else:
    cum_sum.append(cum_sum[-1])

for i, k in zip(l, r):
    print(cum_sum[k-1] - cum_sum[i-1])
# Judge status: Wrong Answer
import math
N,X,T=map(int,input().split(' '))

ans=math.ceil(X/N)*T
print(ans)
# Judge status: Accepted
N,L=map(int,input().split())
if L>0:
    print(sum(L+i for i in range(1,N)))
elif L+N-1<0:
    print(sum(L+i for i in range(N-1)))
else:
    print(sum(L+i for i in range(N)))
# Judge status: Accepted
n, m=map(int, input().split())
ab=[list(map(int, input().split())) for _ in range(n)]
cd=[list(map(int, input().split())) for _ in range(m)]
for i in range(n):
  k=float('inf')
  for j in range(m):
    l=abs(ab[i][0]-cd[j][0])+abs(ab[i][1]-cd[j][1])
    if l<k:
      k=l
      out=j+1
  print(out)
# Judge status: Accepted
n, k = map(int, input().split())
a = [[int(x)-1 for x in input().split()]]

for i in range(1, k.bit_length()):
    ith = [a[-1][a[-1][i]] for i in range(n)]
    a.append(ith)

ans = 0

for i in range(k.bit_length()):
    if (k >> i) & 1:
        ans = a[i][ans]

print(ans+1)
# Judge status: Accepted
n,a,b,c,d=map(int,input().split())
s=list(str(input()))
for i in range(a+1,max(c,d)-1):
    if s[i]==s[i+1]=='#':
        print('No')
        break
else:
    if c<d:
        print('Yes')
    else:
        for i in range(b-2,d-1):
            if s[i]==s[i+1]==s[i+2]=='.':
                print('Yes')
                break
        else:
            print('No')
# Judge status: Wrong Answer
s=input()
while True:
    s=s.replace(s[-1],'')
    if len(s)%2==0 and s[:len(s)//2]==s[len(s)//2:]:
      print(len(s))
      break
# Judge status: Accepted
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    S = list(input())
    even = set(S[1::2])
    odd = set(S[0::2])
    o = {'R', 'U', 'D'}
    e = {'L', 'U', 'D'}
    res = 'Yes'
    if not(even <= e) or not(odd <= o):
        res = 'No'
    print(res)

if __name__ == '__main__':
    main()
# Judge status: Accepted
n,m=map(int,input().split())
ans=0
if(2*n<=m):
    ans+=n
    m-=2*n
    ans+=m//4
else:
    ans+=m//2
print(ans)
# Judge status: Accepted
S = str(input())
hitati = ["hi","hihi","hihihi","hihihihi","hihihihihi"]

if S in hitati:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
import sys
sys.setrecursionlimit(10**7)
input = lambda: sys.stdin.readline().strip()

def main():
    K,N = map(int,input().split())
    A_list = list(map(int,input().split()))
    dist_list = []
    A_list.append(K)
    for i in range(1,len(A_list)):
        dist_list.append(A_list[i]-A_list[i-1])
    d_sorted = sorted(dist_list)
    print(int(sum(d_sorted[0:N-1])))
main()
# Judge status: Accepted
a,b,c = map(int,input().split())
print((a-c)//(b+c))
# Judge status: Accepted
a,b,k=map(int,input().split())
if a>=k:
  a=a-k
elif a+b>=k:
  b=b-(k-a)
  a=0
else:
  a=0
  b=0
print(a,b)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if b<=a and a<=c:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
p,q= input().split()
a,b =(int(p), int(q))
if a % b == 0:
    print(0)
else:
    print(1)
# Judge status: Accepted
a, b = map(int, input().split())
if 13 <= a:
  print(b)
elif 6 <= a and a <= 12:
  print(int(b/2))
else:
  print(0)
# Judge status: Wrong Answer
d,n=map(int,input().split())
if d == 0:
    print(n if n!=100 else "101")
elif d == 1:
    print(n*100 if n!=100 else 10100)
else:
    print(n*10000 if n!=100 else 1000100)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))

bitlist = [0] * 60

for i in A:
    for index, num in enumerate(reversed(bin(i)[2:])):
        if num == "1":
            bitlist[index] += 1
ans = 0
for bit, num in enumerate(bitlist):
    ans += num * (N-num) * (2 ** bit)

print(ans)
# Judge status: Accepted
A, B, M = input().split()
A=int(A)
B=int(B)
M=int(M)
a = list(map(int, input().split()))
b = list(map(int, input().split()))
x = [list(map(int, input().split())) for i in range(M)]
 
dis = []
for i in range(M):
    m = x[i][0]-1
    n = x[i][1]-1
    dis.append(a[m] + b[n] - x[i][2])
    
a.sort()
b.sort()
 
dis.append(a[0]+b[0])
 
print(min(dis))
# Judge status: Accepted
import decimal
a, b = input().split()
a = decimal.Decimal(a)
b = decimal.Decimal(b)
print(int(a*b))
# Judge status: Accepted
n,a,b = map(int, input().split())
s = list(input())

sa = 0
sb = 0
for i in range(n):
    if s[i]=="a":
        if sa+sb<a+b:
            print("Yes")
            sa += 1
        else:
            print("No")
    elif s[i]=="b":
        if sa+sb<a+b and sb<b:
            print("Yes")
            sb += 1
        else:
            print("No")
    else:
        print("No")
# Judge status: Accepted
from heapq import *
n, m = map(int, input().split())
A = list(map(int, input().split()))
h = []
for a in A:
  heappush(h, ((-1) * a, 1))
for _ in range(m):
  b, c = map(int, input().split())
  heappush(h, ((-1) * c, b))

ans = 0
for _ in range(len(A)):
  c, b = heappop(h)
  ans += (-1) * c
  if b > 1:
    heappush(h, (c, b - 1))
print(ans)
# Judge status: Accepted
l = list(map(int, input().split()))
k = int(input())
l.sort()
print(l[2]*(2**k)+l[0]+l[1])
# Judge status: Wrong Answer
s=input()
t=input()
ds={}
dt={}
l=[]
for i in range(len(s)):
  if s[i]!=t[i]:
    if t[i] not in dt:
      dt[t[i]]=0
    if s[i] not in ds:
      ds[s[i]]=0
  else:
    if s[i] in ds or s[i] in dt:
      print('No')
      exit()
print('Yes')
# Judge status: Accepted
r,g,b=map(int,input().split())
ans=r*100+g*10+b
if ans%4==0:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
# coding: utf-8
from collections import deque
S = deque(input())
Q = int(input())
cnt = 0
for i in range(Q):
    q = input().split()
    if q[0] == "1":
        cnt += 1
    else:
        if (int(q[1]) + cnt) % 2 == 1:
            S.appendleft(q[2])
        else:
            S.append(q[2])
ans = "".join(S)
print(ans if cnt % 2 == 0 else ans[::-1])
# Judge status: Accepted
w, h, x, y = map(int, input().split())
square = (w * h) / 2
flg = 0
if x == w / 2 and y == h / 2:
    flg = 1
print(square, flg)
# Judge status: Accepted
N = int(input())
a = [int(input()) for _ in range(N)]

ans, nex = 1, a[0]
while ans < N and nex != 2:
	 nex = a[nex - 1]
	 ans += 1
	 
print(ans if ans != N else -1)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))

l=sorted(a)

cnt=0
for i in range(n):
            if int(a[i])!=int(l[i]):
                        cnt+=1
                   
if cnt>2:
            print('NO')
else:
            print('YES')
# Judge status: Wrong Answer
N=int(input())
A = [int(input()) for _ in range(5)]

print(N//min(A)+5)
# Judge status: Wrong Answer
N = int(input())
Si = [input for i in range(N)]

C0 = 0
C1 = 0
C2 = 0
C3 = 0

for in1 in Si:
    if in1 == "AC":
        C0 +=1
    elif in1 == "WA":
        C1 += 1
    elif in1 == "TLE":
        C2 += 1
    elif in1 == "RE":
        C3 += 1

print("AC x {}".format(C0)) 
print("WA x {}".format(C1)) 
print("TLE x {}".format(C2)) 
print("RE x {}".format(C3))
# Judge status: Accepted
a, b, c = map(int, input().split())
for i in range(0,a*b+1,a):
    if i % b == c:
        print('YES')
        break
else:
    print('NO')
# Judge status: Wrong Answer
s = str(input())
k = 1
a = 0
b = 0
num = 0

for i in range(len(s)):
    if s[i] == 'A':
        if k == 1:
            a = i
            k = 2
    if s[i] == 'Z':
        if k == 2:
            b = i - a + 1
            k = 1
            if num < b:
                num = b

print(num)
# Judge status: Accepted
import itertools 

A = [list(map(int,input().split())) for i in range(3)]
AA = list(itertools.chain.from_iterable(A))
grid = []
N = int(input())
for i in range(N):
  b = int(input())
  if b in AA:
    grid.append(AA.index(b))
    
#print(grid)

if (0 in grid and 4 in grid and 8 in grid) or (2 in grid and 4 in grid and 6 in grid):
  print("Yes")
elif(0 in grid and 1 in grid and 2 in grid) or (3 in grid and 4 in grid and 5 in grid) or (6 in grid and 7 in grid and 8 in grid):
  print("Yes")
elif(0 in grid and 3 in grid and 6 in grid) or (1 in grid and 4 in grid and 7 in grid) or (2 in grid and 5 in grid and 8 in grid):
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
S, C = map(int, input().split())
ans = 0

# 初期のSで可能な限りSCCを作る
if S*2 <= C:
    C = C - S*2
    print(C, S, C//4)
    ans += S
    ans += C // 4
else:
    print(C//2)
    ans += C // 2

print(ans)
# Judge status: Accepted
import math
n,k=map(int,input().split());input();print(math.ceil((n-1)/(k-1)))
# Judge status: Wrong Answer
text_ = input()

if text_ != text_[::-1]:
    print('No')
elif text_[:((len(text_) - 1)//2)] != text_[:((len(text_) - 1)//2)][::-1]:
    print('No')
elif text_[:((len(text_) + 3) // 2)] != text_[:((len(text_) + 3) // 2)][::-1]:
    print('No')
else:
    print('Yes')
# Judge status: Wrong Answer
N,M = map(int,input().split())
res = {}
for _ in range(M):
    a,b = map(int,input().split())
    if a in res.keys():
        res[a] += 1
    else:
        res[a] = 1
    if b in res.keys():
        res[b] += 1
    else:
        res[b] = 1
for key,value in sorted(res.items()):
    print(value)
# Judge status: Accepted
import re
s = input()
k = int(input())

if s[0] != '1':
    print(s[0])
    exit()
else:
    pos = re.search(r'1+',s).end()
    if k <= pos:
        print(1)
    else:
        print(s[pos])
# Judge status: Accepted
#!/usr/bin/env python3
import heapq

n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
bc = [list(map(int, input().split())) for _ in range(m)]

bc = sorted(bc, key=lambda x: x[1], reverse=True)
# print(bc)

heapq.heapify(a)
for b, c in bc:
    for i in range(b):
        num = heapq.heappop(a)
        if num < c:
            heapq.heappush(a, c)
        else:
            heapq.heappush(a, num)
            break
# print(a)
print(sum(a))
# Judge status: Wrong Answer
x,a,b=map(int,input().split());print(['a','b'][abs(x-a)>abs(x-b)])
# Judge status: Accepted
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
now = 99999
ans = 0
for i in range(N):
  tem = T - H[i] * 0.006
  if abs(tem - A ) < now:
    now = abs(tem - A)
    ans = i+1
print(ans)
# Judge status: Wrong Answer
X,Y = map(int,input().split())
M = max(X,Y)
m = min(X,Y)
mod = 10 ** 9 + 7

if (X + Y) % 3 != 0:
  print(0)
  
else:
  con = (X + Y) // 3
  dif = M - m
  n = (con - dif) // 2
  
  def comb(n, r):
    n += 1
    over = 1
    under = 1
    for i in range(1,r + 1):
      over = over * (n - i) % mod
      under = under * i % mod
    #powでunder ** (mod - 2) % modを実現、逆元を求めている
    return over * pow(under,mod - 2,mod) % mod
  
  ans = comb(con,n)
  
  print(ans)
# Judge status: Wrong Answer
n=int(input())
p=list(map(int,input().split()))
x=0
for i in range(n-1):
    if int(p[i])!=i+1:
        x+=1
if x<=2:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
p,q,r=map(int,input().split())
if p+q<=q+r and p+q<p+r:
    print(p+q)
if p+r<=p+q and p+r<q+r:
    print(p+r)
if q+r<=p+r and q+r<p+q:
    print(q+r)
if p+r==q+r and p+r<p+q:
    print(p+r)
if p==q==r:
    print(p+q)
if r+p==q+r and r+p>p+q:
    print(r+p)
# Judge status: Wrong Answer
a, b, c = map(int, input().split())
if a <= c <= b or b <= c <= a:
    print('YES')
else:
    print('No')
# Judge status: Accepted
N=int(input())
ans=0
for i in range(N//2):
  s=0
  a=i+1
  b=N-i-1
  while a>0 or b>0:
    s+=a%10+b%10
    a=a//10
    b=b//10
  if ans==0 or ans>s:
    ans=s
print(ans)
# Judge status: Wrong Answer
def answer(x, y):
    absX = abs(x)
    absY = abs(y)
    a = abs(absY - absX)
    b = 0
    if (x == 0 and y > 0) or (x < 0 and y == 0):
        return a
    if (x == 0 and y < 0) or (x > 0 and y == 0):
        return a+1
    if x > 0 and y > 0:
        if x < y:
            return a
        else:
            return (x+y)+1
    if (x < 0 and y > 0) or (x > 0 and y < 0):
        return a+1

x, y = map(int, input().split())
print(answer(x, y))
# Judge status: Accepted
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    n, k = map(int, input().split())
    h = sorted([int(input()) for _ in range(n)])
    ans = float('inf')
    for i in range(n-k+1):
        ans = min(ans, h[i+(k-1)]-h[i])
    print(ans)
            
if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
N, M = map(int, input().split())
ans = 0
if 2*N <= M:
    ans += N
    M -= 2*N
ans += M//4
print(ans)
# Judge status: Accepted
n = int(input())

lst = list(map(int,str(n)))
if len(lst) == 1:
    print(n)
elif set(lst[1:]) == {9}:
    print(lst[0] + 9*(len(lst)-1))
else:
    print((lst[0]-1) + 9*(len(lst)-1))
# Judge status: Wrong Answer
T, S, K = list(map(int, input().split()))

if T - K > 0:
    print(T - K, S)

else:
    print(0, T - K + S)
# Judge status: Wrong Answer
paramT = input()
paramReplaced = list(paramT.replace('?', 'D'))
point = 0
for i in range(len(paramReplaced)):
    if paramReplaced[i] == 'D':
        point += 1
    if i != 0 and paramReplaced[i - 1] == 'P' and paramReplaced[i - 1] == 'D':
        point += 1

print(point)
# Judge status: Wrong Answer
def main():
    N = int(input())
    s = input()
    t = input()
    if s == t:
        print(N)
    else:
        s = s[::-1]
        count = 0
        for i in range(N):
            if s[i] == t[i]:
                count += 1
            else:
                break
        print(2*N-count)

if __name__ == '__main__':
    main()
# Judge status: Accepted
a,b,c = map(int,input().split())
d = [a,b,c]
d = sorted(d)
if d[0]+d[1]==d[2]:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
N=int(input())
Array = list(map(int, input().strip().split()))
array=list(set(Array))
array.sort()
n=len(array)
f=0
for i in range(0,n-2):
    for j in range(i+1,n-1):
        for w in range(j+1,n):
            if array[i]+array[j]>array[w]:
                f+=Array.count(array[i])*Array.count(array[j])*Array.count(array[w])
print(f)
# Judge status: Accepted
import math

N = int(input())
a_li = []
b_li = []
ans = 0
for _ in range(N):
    a, b = map(int, input().split())
    a_li.append(a)
    b_li.append(b)
for i in reversed(range(N)):
    a, b = a_li[i], b_li[i]
    a += ans
    div = math.ceil(a / b)
    ans += b * div - a
print(ans)
# Judge status: Wrong Answer
import itertools
l = list(map(int,input().split()))
k = int(input())
p = list(itertools.combinations_with_replacement([0,1,2], k))
f = False

ans = 0
for i in p:
  a = (l[0] * 2 * i.count(0) if i.count(0) else 1)
  b = (l[1] * 2 * i.count(1) if i.count(1) else 1)
  c = (l[2] * 2 * i.count(2) if i.count(2) else 1)
  if a<b<c:
    f = True

if f == False:
  print("No")
else:
  print("Yes")
# Judge status: Wrong Answer
import sys

k = int(input())

counter = 13
if k < 13 :
    print(k)
else :
    for i in range(13, k**3) :
        counter += 1
        nums = list(map(int, list(str(i))))
        for j in range(0, len(nums)-1) :
            if abs(nums[j] - nums[j+1]) > 1 :
                counter -= 1
                break
        if counter == k :
            print(i+1)
            sys.exit()
# Judge status: Accepted
N,M=map(int,input().split())
cnt_loved=[0]*M
ans=0

for _ in range(N):
    love_list=list(map(int,input().split()))
    for a in love_list[1:]:
        cnt_loved[a-1]+=1
        
for i in range(M):
    if cnt_loved[i]==N:
        ans+=1
        
print(ans)
# Judge status: Wrong Answer
n = int( input() )
alphabet = [ '' ] + [chr(i) for i in range(97, 97+26)]

conv = []
k = n
while k > 0:
    conv.append( k % 26 )
    k = k // 26

ans = []
for c in conv:
    ans.append( alphabet[ c ] )

print( "".join( reversed( ans ) ) )
# Judge status: Accepted
s=input()
n=len(s)

if n%2==0:
    odd=even=n//2
else:
    even=n//2
    odd=even+1
    
odd_black=0
even_black=0

for i in range(n):
    if i%2==0:
        if s[i]=="0":
            odd_black+=1
    else:
        if s[i]=="0":
            even_black+=1

odd_white=odd-odd_black
even_white=even-even_black

if odd_black<=even_black:
    count=odd_black+even_white
else:
    count=odd_white+even_black

print(count)
# Judge status: Accepted
import math

n = int(input())

a = math.floor(n / 15)

print(800 * n - 200 * a)
# Judge status: Accepted
from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(10 ** 7)

n = int(stdin.readline().rstrip())
li = [0]*1000000

for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            li[i**2+j**2+k**2+i*j+j*k+k*i] += 1

for i in range(1,n+1):
    print(li[i])
# Judge status: Accepted
''' Versao V judge'''
line = input()
num = [int(n) for n in line.split()][0]
predicted_value = "NO"
if num in [3, 5, 7]:
    predicted_value = "YES"
print(predicted_value)
# Judge status: Accepted
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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

    diff = []

    for i in range(N):
        diff.append(A[i] - (i + 1))
    diff.sort()
    b = (diff[(N - 1) // 2] + diff[N // 2]) // 2

    result = 0
    for i in range(N):
        result += abs(A[i] - (i + 1 + b))
    print(result)


if __name__ == "__main__":
    main()
# Judge status: Accepted
import math
h, a = map(int, input().split())

print(math.ceil(h / a))
# Judge status: Accepted
a=int(input())
s=input('')
if a>=3200:
  print(s)
else :
  print('red')
# Judge status: Accepted
k = int(input())

ls = []

def dfs(n):
    if len(n) >= 12:
        return
    ls.append(int(n))
    lastNum = int(n[-1])
    for i in range(max(0, lastNum-1), min(lastNum + 2, 10)):
        dfs(n + str(i))

dfs("1")
dfs("2")
dfs("3")
dfs("4")
dfs("5")
dfs("6")
dfs("7")
dfs("8")
dfs("9")

ls = list(ls)
ls = sorted(ls)
print(ls[k-1])
# Judge status: Accepted
n,k = (int(x) for x in input().split())
town = [int(i) for i in input().split()]
warp  = [1]
checklist = [0]+[-1]*n
i = 0
j = 1
s = 0
while j<=n:
    warp.append(town[i])
    if checklist[town[i]-1]!=-1:
        s = checklist[town[i]-1]
        loop = warp[s:j]
        break
    checklist[town[i]-1] = j
    i = town[i]-1
    j += 1
if k>=s:
    m = len(loop)
    print(loop[(k-s)%m])
else:
    print(warp[k])
# Judge status: Wrong Answer
a, b = map(str,input().split())
c = a + b
d = int(c)

i = 0

while i < 317:
  e = i * i
  if e == d:
    print("Yes"),
    i = 317
  else:
    if e > d:
      print("No")
      i = 317
    else:
      i = i +1
# Judge status: Wrong Answer
def tax8(n):
    return int(n*(1.08))
    
def tax10(n):
    return int(n*(1.1))

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

ans = -1

x = []
for i in range(1,a+1):
    if tax8(i) == a:
        x.append(i)
        
y = []
for i in range(1,b+1):
    if tax10(i) == b:
        y.append(i)
        
for i in x:
    if i in y:
        ans = i
        break
    
print(ans)
# Judge status: Wrong Answer
N, M = list(map(int, input().split()))

for i in range(M):
  print(1 + i, N - i)
# Judge status: Accepted
#create date: 2020-04-04 21:11

import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n, k = na()
    print(min(n%k, k-(n%k)))

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
n = int(input())
a_list = [0] + list(map(int, input().split()))
b_list = [0] + list(map(int, input().split()))
c_list = [0] + list(map(int, input().split()))

sum = 0
j = 1

for i in range(1, n+1):
    sum += b_list[a_list[i]]
    if i >= 2:
        if a_list[i] == a_list[i-1] + 1:
            sum += c_list[a_list[i-1]]
            #j += 1
    print(sum)


print(sum)
# Judge status: Wrong Answer
s = input()
t = sorted(s)

if t[0] == t[1] and t[2] == t[3]:
  print('Yes')
else:
  print('No')