peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
s = input()
if len(s)==1:
  print(0)
else:
  start0 = 0
  start1 = 0
  for i in range(0,len(s),2):
    if s[i]=="1":
      start0 += 1
  for i in range(1,len(s),2):
    if s[i]=="0":
      start0 += 1
  for i in range(0,len(s),2):
    if s[i]=="0":
      start1 += 1
  for i in range(1,len(s),2):
    if s[i]=="1":
      start1 += 1
  print(min(start0,start1))
# Judge status: Accepted
# -*- coding: utf-8 -*-
sx, sy, tx, ty = map(int, input().split())
dx,dy = tx-sx, ty-sy

r1 = 'U'*dy + 'R'*dx
r2 = 'D'*dy + 'L'*dx

r3 = 'LU'+r1+'RD'
r4 = 'RD'+r2+'LU'

print(r1+r2+r3+r4)
# Judge status: Wrong Answer
x = input()
print("Yes" if x in "753" else "No")
# Judge status: Wrong Answer
A = [list(map(int, input().split())) for _ in range(3)]
N = int(input())
B = [int(input()) for _ in range(N)]

l = [[(a_i in B) for a_i in a] for a in A]

flag = 0
for y in range(3):
    flag |= all(l[y])

for x in range(3):
    flag |= all(l[x][y] for y in range(3))

flag |= all([l[y][x] for x, y in [(0, 0), (1, 1), (2, 2)]])

flag |= all([l[y][x] for x, y in [(0, 2), (1, 1), (2, 0)]])

print("Yes" if flag else "No")
# Judge status: Accepted
s = input()
k = int(input())

cnt = 0
for c in s:
    if c == '1':
        cnt += 1
    else:
        print(c)
        break

    if cnt >= k:
        print(c)
        break
# Judge status: Wrong Answer
import math

a,b,x = map(int,input().split())
 
print(math.floor(b/x)-math.floor((a-1)/x))
# Judge status: Accepted
import sys

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

    ans = 0
    for i in range(N):
        ans += min(A[i], B[i])
        B[i] -= min(A[i], B[i])

        ans += min(A[i+1], B[i])
        A[i+1] -= min(A[i+1], B[i])

    print(ans)

main()
# Judge status: Accepted
def main():
    n = int(input())
    a = [None]*n
    for i in range(n):
        s, p = map(str, input().split())
        p = int(p)
        p *= -1
        a[i] = [s, p, i+1]
    a.sort(key=lambda x: (x[0], x[1]))
    for i in range(n):
        print(a[i][2])

if __name__ == "__main__":
    main()
# Judge status: Accepted
n = int(input())
s = 0
if n>= 500:
    res = n//500
    s = 1000*res
    n = n - res * 500
if n>=5:
    res = n//5
    s = s + res*5
print(s)
# Judge status: Accepted
count1=0
count2=0
count3=0
count4=0
N=int(input())
for i in range(N):
  A=input()
  if A=="AC":
    count1=count1+1
  elif A=="WA":
    count2=count2+1
  elif A=="TLE":
    count3=count3+1
  elif A=="RE":
    count4=count4+1
print("AC x "+str(count1))
print("WA x "+str(count2))
print("TLE x "+str(count3))
print("RE x "+str(count4))
# Judge status: Accepted
N = int(input())
I = []

for _ in range(N):
  I.append(list(map(int, input().split())))

L = sorted(I)
R = sorted(I, key = lambda x: x[1])

if N%2 == 1:
  x = N//2
  print(R[x][1] - L[x][0] + 1)
else:
  x = N//2
  M = R[x][1] - L[x][0] + 1
  m = R[x-1][1] - L[x-1][0] + 1
  print(M + m - 1)
# Judge status: Accepted
from bisect import bisect_left,bisect_right
N=int(input())
A=list(map(int, input().split()))
A.sort()
ans=0
for i in range(N):
    for j in range(i+1,N):
        a,b=A[i],A[j]
        B=A[j+1:]
        l=abs(a-b)
        r=a+b
        # print(bisect_left(B,r)-bisect_right(B,l))
        ans+=bisect_left(B,r)-bisect_right(B,l)
print(ans)
# Judge status: Accepted
import bisect
n=int(input())
l=sorted(list(map(int,input().split())))
ans=0
for i in range(n-2):
    for j in range(i+1,n-1):
        ans+=bisect.bisect_left(l,l[i]+l[j])-j-1
print(ans)
# Judge status: Accepted
import sys
read = sys.stdin.read

def main():
  MOD = 10**9+7
  n, *A = map(int, read().split())
  ans = 0
  for j in range(61):
    c = 0
    for i in A:
      if i>>j & 1:
        c += 1
    ans += 2**j*((n-c)*c)
    ans %= MOD
  print(ans%MOD)
  
if __name__ == "__main__":
  main()
# Judge status: Accepted
a, b, c = map(int, input().split())
if (a < c and c < b) or (a > c and c > b):
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
print('Yes' if int(input())%9 else 'No')
# Judge status: Accepted
n, m = map(int, input().split())
students = [list(map(int, input().split())) for i in range(n)]

targets = [list(map(int, input().split())) for i in range(m)]
x = 0
snumber = [(0, x)] * n
  
def md(s, t):
  d = abs(s[0] - t[0]) + abs(s[1] - t[1])
  return d

for i in range(n):
  x = 4 * 10 ** 8
  for j in range(m):    
    if x > md(students[i], targets[j]):
      x = md(students[i], targets[j])
      snumber[i] = (j+1, md(students[i], targets[j]))
      
for i in range(n):      
  print(snumber[i][0])
# Judge status: Accepted
import collections
n = int(input())
a = list(map(int, input().split()))
x = []
for i in range(n):
    x.append(a[i]-i)
y = []
for j in range(n):
    y.append(-(a[j]+j))
    
X = collections.Counter(x)
Y = collections.Counter(y)



ans = 0
z = X.keys()
#print(z)
for i in z:
    p =X.get(i,0)
    q =Y.get(i,0)
    ans += p*q
print(ans)
# Judge status: Accepted
n = int(input())
 
def check(p):
  c = 0
  for i in range(1,p+1):
    if p % i == 0:
      c += 1
  return c
 
ans = 0
for i in range(1,n+1):
  if i % 2 == 1:
    if check(i) == 8:
      ans += 1
      
print(ans)
# Judge status: Accepted
a, b, c, d = map(int, input().split())
if abs(b-a) <= d and abs(c-b) <= d:
    print("Yes")
elif abs(c-a) <= d:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
N=int(input())
Di=[input() for i in range(N)]
count=0
n=0
D=[]
a=[]
A=0
for i in range(N):
    D.append(Di[i].split())

for i in range(N):
    if D[i][0]==D[i][1]:
        count+=1
    else:
        a.append(count)
        count=0
if len(a)==0:
    A=0
else:
    A=max(a)

if A>count:
    n+=A
else:
    n+=count
if n>=3:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import sys
import numpy as np
import math
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.readline().split())
def Li():return list(map(int,sys.stdin.readline().split()))
n,k = Mi()
a = np.array(sys.stdin.readline().split(), np.int64)
mina = np.sum(a//(n+k))
maxa = np.max(a)
while maxa > mina+1:
  mid = (mina+maxa)//2
  div = np.sum(np.ceil(a/mid))-n
  if div > k:
    mina = mid
  else:
    maxa = mid
  
print(maxa)
# Judge status: Accepted
m = int(input())
a = list(map(int, input().split()))

mod = 10**9 + 7
ans = 0

tmp_sum = sum(a[1:m]) % mod

for x in range(m-1):
  if a[x] % mod != 0:
    ans += (a[x] * tmp_sum) % mod
  
  tmp_sum -= a[x+1] % mod

print(ans%mod)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
al=0
for i in range(n):
  if a[i]>=3200:
    al+=1
    a[i]=8
  else:
    a[i]=a[i]//400
if al==0:
  cl=len(set(a))
else:
  cl=len(set(a))-1
if cl==0:
  mi=1
else:
  mi=cl
ma=al+cl
print(mi,ma)
# Judge status: Wrong Answer
a,b = map(int,input().split())
if (abs(a-b)/2)%2 == 0:
  print((abs(a-b)//2))
else:
  print('IMPOSSIBLE')
# Judge status: Accepted
# -*- coding: utf-8 -*-
# get a integer
a = int(input())

m = a
c = 1
while m % 360 != 0:
	m+=a
	c+=1
print(c)
# Judge status: Accepted
print('Yes') if '9' in input() else print('No')
# Judge status: Accepted
import math
n, a, b = [int(w) for w in input().split()]
if (a + b) % 2 == 0:
    ans = (b - a) // 2
else:
    ans = min(a - 1, n - b)
    ans += 1 + (b - a) // 2
print(ans)
# Judge status: Accepted
S,T=map(str,input().split())
A,B=map(int,input().split())
U=input()

if U==S:
    print(A-1,B)
else:
    print(A,B-1)
# Judge status: Wrong Answer
n,x,y = map(int,input().split())
 
def dist(i,j):
  return min(j - i, abs(x - i) + abs(y - j) + 1)
 
listlist = [0]*(n-1)
 
for i in range(1,n):
    for j in range(i + 1, n + 1):
        print(j-i,abs(x - i) + abs(y - j) + 1)
        distance = dist(i,j)
        listlist[distance-1] = listlist[distance-1] + 1
    
for k in listlist:
  print(k)
# Judge status: Wrong Answer
N=int(input())
S=[list(map(str,input().split())) for i in range(N)]

A=sorted(S,key=lambda x: int(x[1]), reverse=True)
A=sorted(A,key=lambda x: x[0])


for i in range(N):
    ans=A.index(S[i])+1
    print(ans)
# Judge status: Accepted
n=int(input())
from collections import Counter as co
var=co(list(map(int,input().split()))).items()
f,s=0,0
for k,v in var:
	if v>=4:
		if f<k:
			f,s=k,max(k,f)
		else:
			s=max(s,k)
	if v>=2:
		if f<k:
			f,s=k,f
		else:s=max(s,k)
print(f*s)
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))

from collections import Counter
a=Counter(a).most_common()

li=[]
li4=[]

for x,y in a:
  if  y>=4:
    li4.append(x)
  elif y>=2:
    li.append(x)

li.sort()
li4.sort()

if len(li)<2:
  print(0)
  exit()

x=0
if li4:
  x=(li4[-1])**2

y=li[-1]*li[-2]

print(max(x,y))
# Judge status: Accepted

s=input()
if s=="Sunny":
    print("Cloudy")
if s=="Cloudy":
    print("Rainy")
if s=="Rainy":
    print("Sunny")
# Judge status: Wrong Answer
#ABC048A https://atcoder.jp/contests/abc048/tasks/abc048_a

a,b,c=input().split()

print(a[0],b[0],c[0])
# Judge status: Accepted
from collections import Counter
N = int(input())
A = Counter(map(int, input().split()))

S = []
for a, c in A.items():
    S.extend([a] * (c // 2))

S.sort()
if len(S) < 2:
    print(0)
else:
    print(S[-1] * S[-2])
# Judge status: Accepted
m = [  int(input()) for _ in range(5) ]
m_min = sorted(m, key=lambda x: (x%10))
idx = 0
for i,x in enumerate(m_min):
    if x%10 != 0:
        idx = i
        break
order = [  i if i % 10 == 0 else (int(i/10) + 1) * 10 for i in m_min]
print(sum(order)+m_min[idx]-order[idx])
# Judge status: Wrong Answer
#ABC-118-B
N, M = map(int, input().split())
memo = [0]*(M+1)

for _ in range(N):
    Ki, *A = map(int, input().split())
    for item in A:
        memo[int(item)] += 1

ans = 0
for i in range(1, M):
    if memo[i] == N:
        ans += 1
        
print(ans)
# Judge status: Wrong Answer
s=input()
a=s.count('a')
b=s.count('b')
c=s.count('c')
if len(set(list(s)))==1 and len(s)>1:
  print('NO')
elif len(set(list(s)))==2 and len(s)>2:
  print('NO')
elif abs(a-b)<=1 or abs(b-c)<=1 or abs(c-a)<=1:
  print('YES')
else:
  print('NO')
# Judge status: Accepted
from bisect import bisect
N=int(input())
A=sorted(list(map(int,input().split())))
B=sorted(list(map(int,input().split())))
B_reverse=B[::-1]
C=sorted(list(map(int,input().split())))
cnt=0
dict={}
val=0
for b in B_reverse:
    c_min=bisect(C,b)
    val+=N-c_min
    dict[b]=val
for a in A:
    b_min=bisect(B,a)
    if b_min==N:
        pass
    else:
        cnt+=dict[B[b_min]]
print(cnt)
# Judge status: Wrong Answer
import fractions
from functools import reduce

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

N = int(input())
n = 0

for i in range(N):
    for j in range(N):
        for k in range(N):
            n += gcd(i,j,k)
print(n)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))

up=2
ans=1
for i in range(1,n):
    if up==2:
        if a[i-1]<a[i]:
            up=1
        elif a[i-1]>a[i]:
            up=0
    elif up==1 and a[i-1]>a[i]:
        up=2
        ans+=1
    elif up==0 and a[i-1]<a[i]:
        up=2
        ans+=1
        
print(ans)
# Judge status: Wrong Answer
S = list(input())
N = len(S)

l = [0] * 2019
temp = 0
e = 1
for i in range(N-1, -1, -1):
    temp += int(S[i]) * e
    temp %= 2019
    l[temp] += 1
    e *= 10

ans = l[0]

for i in range(1, 2019):
    ans += l[i] * (l[i]-1) // 2

print(ans)
# Judge status: Wrong Answer
x=int(input())
if -40<=x<=40:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
#129 a
p,q,r=map(int,input().split())
a=p+q
b=q+r
c=r+p
ans=min(a,b,c)
print(ans)
# Judge status: Wrong Answer
n=int(input())
l=[int(input()) for i in range(5)]
print(5+n//min(l))
# Judge status: Accepted
N, K = map(int, input().split())

ans = 0
for i in range(1, N + 1):
    tmp = i
    count = 0
    while tmp < K:
        count += 1
        tmp *= 2
    ans += pow(1/2, count)

print (ans / N)
# Judge status: Accepted
n, m = map(int, input().split())

if n == m:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

s = input()
k = int(input())
al = [chr(ord('a') + i) for i in range(26)]
ans = ''
for i in range(len(s)):
    num = al.index(s[i])
    if 26 - num <= k:
        k -= 26 - num
        ans += 'a'
    else:
        if i != len(s) - 1:
            ans += s[i]
        else:
            ans += al[num + k]
print(ans)
# Judge status: Accepted
s=input()

tmp=""
bk=""
cnt=0

for ss in s:
    tmp+=ss
    if bk != tmp:
        cnt+=1
        bk=tmp
        tmp=""

    
print(cnt)
# Judge status: Accepted
vowel_group = {'a','i','u','e','o'}
c = input()

if c in vowel_group:
  print('vowel')
else:
  print('consonant')
# Judge status: Accepted
S = input()
T = input()
sdic = {}
tdic = {}
flag = True
for s, t in zip(S, T):
  if s not in sdic:
    sdic[s] = t
  if t not in tdic:
    tdic[t] = s
  if sdic[s] != t or tdic[t] != s:
    flag = False
    break
if flag:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
def func(x):
    return x[0]

n,w = map(int,input().strip().split(" "))

arr = []
for i in range(0,n):
    wi,vi = map(int,input().strip().split(" "))
    arr.append([vi/wi,vi,wi])

arr.sort(key=func)
ans = 0
for i in arr:
    if w-i[2] >= 0:
        ans += i[1]
        w -= i[2]
    else:
        break
print(ans)
# Judge status: Accepted
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,copy
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 = inp()
a = inpl()
cnt = 0
for i in range(n):
    if a[i] < 0:
        cnt += 1
a = [abs(x) for x in a]
a.sort()
if cnt%2:
    a[0] = -a[0]
print(sum(a))
# Judge status: Wrong Answer
#二分探索
from bisect import bisect_left
from bisect import bisect_right
#input
N = int(input())
#print(N)

A = sorted(list(map(int, input().split()))) #この表記について...
B = sorted(list(map(int, input().split())))
C = sorted(list(map(int, input().split())))
#print(A,B,C)

#sort 昇順に並び替え
#A.sort()
#B.sort()
#C.sort()
ans = 0
for i in range(N):
    ab = bisect_left(A,B[i])
    bc = N-bisect_right(C,B[i])
    print(ab, end='  ')
    print(bc)
    ans += ab*bc
print(ans)
# Judge status: Accepted
# coding: utf-8
# Your code here!

x = int(input())

if x<600:
    print(8)
elif x<800:
    print(7)
elif x<1000:
    print(6)
elif x<1200:
    print(5)
elif x<1400:
    print(4)
elif x<1600:
    print(3)
elif x<1800:
    print(2)
elif x<2000:
    print(1)
# Judge status: Accepted
n,m = map(int,input().split())
ac,wa = 0,0
number=[0]*n

for i in range(m):
  p,s = input().split()
  p = int(p) - 1
  if number[p]!=-1:
    if s == "WA":
      number[p]+=1
    elif s == "AC":
      ac+=1
      wa+=number[p]
      number[p]=-1
print(ac,wa)
# Judge status: Accepted
X = int(input())
print((1999-X) // 200 + 1)
# Judge status: Accepted
A,B = map(int,input().split(sep=" "))
i = 0
for i in range(0, 1251,1):
    if i*8//100 == A and i*10//100 == B:
        print(i)
        exit()
print(-1)
# Judge status: Accepted
S = input()
T = input()

S = S + T[-1]
if S == T:
    ans = 'Yes'
else:
    ans = 'No'
print(ans)
# Judge status: Wrong Answer
a, b = map(int, input().split())

time = a + b
if time > 24:
    print(time - 24)
else:
    print(type(time))
# Judge status: Accepted
D,N = map(int,input().split())
ans = 0

if D == 0 and N !=100:
  print(N)
  
elif D == 0 and N == 100:
  print(101)
  
elif D == 1 and N !=100:
  print(N*100)
  
elif D == 1 and N == 100:
  print(10100)
  
elif D == 2 and N != 100:
  print(N*10000)
  
else:
  print(1010000)
# Judge status: Accepted
n,k = map(int,input().split())
a = [int(x) for x in input().split()]
d = {}
ans_list = []
ans = 0

for aa in a:
    if aa not in d:
        d[aa] = 0
    d[aa] += 1

for v in d.values():
    ans_list.append(v)

ans_list.sort()

for i in range(len(ans_list) - k):
    ans += ans_list[i]

print(ans)
# Judge status: Wrong Answer
A,B,C = map(int,input().split())

if A<= C <= B:
  print('YES')
else:
  print('NO')
# Judge status: Accepted
a,b = map(int,input().split())

ans = 0
for i in range(a,b+1):
    s = str(i)
    if s[0] == s[4] and s[1] == s[3]:
        ans += 1

print(ans)
# Judge status: Accepted
s=str(input())
ans=12000
for i in range(len(s)-2):
    ans=min(ans,abs(753-int(s[i:i+3])))
print(ans)
# Judge status: Accepted
N, D = map(int, input().split())
l = [list(map(int, input().split())) for i in range(N)]

ans=0
s=0
for i in range(N):
  for j in range(i+1,N):
    s=0
    for d in range(D):
      s+=(l[i][d]-l[j][d])**2
    if s**(1/2)%1==0:
      ans+=1
print(ans)
# Judge status: Wrong Answer
n=int(input())
print(n*(n-1)//2)
# Judge status: Accepted
s = input()
if len(set(s)) == 2 and s.count(s[0]) == 2:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
a,b=map(int,input().split())
total=a*(a+2*b-1)//2
x=b
y=a+b-1
z=min(abs(x),abs(y))
if x<=0 and y>=0:
  print(total)
else:
  print(total-z)
# Judge status: Accepted
n,m = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
y=[abs(x[i]-x[i+1]) for i in range(m-1)]
y.sort(reverse=1)
print(sum(y[n-1:]))
# Judge status: Accepted
n,m=map(int,input().split())
ans=1
for i in range(int((m**0.5))+1, 0, -1):
    if m%i==0:
        a=i
        b=m//i
        if a*n<=m:
            ans=max(ans, a)
        if b*n<=m:
            ans=max(ans, b)
        
print(ans)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))

yen = 1000
stocks = 0

for i in range(N):
  if i == N-1:
    yen += stocks * A[i]
    stocks = 0
    break
  
  if A[i] > A[i-1]:
    # sell everything
    yen += stocks * A[i]
    stocks = 0
  else:
    # buy everything
    num = yen // A[i]
    stocks += num
    yen -= A[i] * num

print(yen)
# Judge status: Accepted
import math

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

C, D = c, d
if C < D:
  C, D = D, C
r = C % D
while r > 0:
  C = D
  D = r
  r = C % D
lcm = c * d // D

cPower = b//c - math.ceil(a/c) + 1
dPower = b//d - math.ceil(a/d) + 1
cdPower = b//lcm - math.ceil(a/lcm) + 1

print(max((b-a+1) - cPower - dPower + cdPower, 0))
# Judge status: Accepted
a, b, c, k = [int(i) for i in input().split()]
if a >= k:
	ans = k
elif (a+b) >= k:
	ans = a
else:
	ans = a - (k-a-b)

print(ans)
# Judge status: Accepted
n,k = [int(j) for j in input().split()]
l = [int(j) for j in input().split()]
l.sort()
l = l[::-1]
for i in range(min(k, n)):
    l[i] = 0
print(sum(l))
# Judge status: Accepted
def main():
    from math import gcd
    a, b, c, d = (int(i) for i in input().split())
    L = c*d//gcd(c, d)
    ans = b - (b//c + b//d - b//L)
    ans -= (a-1) - ((a-1)//c + (a-1)//d - (a-1)//L)
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
S = 'oder'
T = 'atc'
H=T+S
print(H)
# Judge status: Accepted
n = int(input())
v = [int(i) for i in input().split()]
v = sorted(v)

s = v[0]
for i in range(n):
  s = (s + v[i] ) / 2

print(s)
# Judge status: Wrong Answer
n,m,x,y = map(int,input().split())
xx = list(map(int,input().split()))
yy = list(map(int,input().split()))
if x < y and max(xx) <= y and x < min(yy):
    print("No War")
else:
    print("War")
# Judge status: Wrong Answer
ss = input()
for i in range(2, len(ss), 2):
    tt = ss[:-i]
    l = len(tt) // 2
    if tt[:l] == tt[l:]:
        print(tt)
        break
# Judge status: Accepted
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    ls = [chr(i) for i in range(97, 97 + 26)]
    c = str(readline().rstrip().decode('utf-8'))
    for i in range(1, len(ls)):
        if ls[i-1] == c:
            print(ls[i])
            exit()


if __name__ == '__main__':
    solve()
# Judge status: Accepted
def calculate(A, B, C):
    for i in range(1000):
        if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
            return i
        else:
            _A = (B + C) // 2
            _B = (A + C) // 2
            _C = (A + B) // 2
            A, B, C = _A, _B, _C
    return -1

A, B, C = map(int, input().split())
print(calculate(A, B, C))
# Judge status: Accepted
N = int(input())
a = list(map(int, input().split()))
a.insert(0, 0)
b = [0] * N
M = 0
for i in range(N, 0, -1):
    ball = 0
    for j in range(i + i, N + 1, i):
        ball ^= b[j - 1]
    b[i - 1] = ball ^ a[i]
M = sum(b)
print(M)
for i in range(N):
    if b[i]:
        print(i + 1, end = ' ')
# Judge status: Wrong Answer
N = int(input())

D = {}
for i in range(N):
    S = input()
    if S in D:
        D[S] += 1
    else:
        D[S] = 1

t = max(D)
M = D[t]
E = []
for s in D:
    if D[s] == M:
        E.append(s)

E = sorted(E)

for i in range(len(E)):
    print(E[i])
# Judge status: Accepted
K, N = map(int, input().split())
A = list(map(int, input().split()))
li = []
for i in range(N):
    if i == 1:
        cadA = A[N-1] - A[0]
    else:
        cadA = K - A[i] + A[i-1]
    if i == N-1:
        cadB = A[N-1] - A[0]
    else:
        cadB = A[i] + (K - A[i+1])
    li.append(min(cadA, cadB))
print(min(li))
# Judge status: Accepted
a, b = map(int, input().split())

cur = 1
ans = 0

while cur < b:
    cur += a - 1
    ans += 1

print(ans)
# Judge status: Accepted
N = int(input())
X = [int(i) for i in input().split()]

min_d = 10000000

for p in range(1,101):
    d = 0
    for x in X:
        d += (x-p)**2
    if d <= min_d:
        min_d = d
print(min_d)
# Judge status: Accepted
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc130/tasks/abc130_b

n, x = [int(x) for x in input().split()]
li = [int(x) for x in input().split()]
li2 = [0] + [sum(li[:i + 1]) for i, n in enumerate(li)]
li2 = [n for n in li2 if n <= x]
print(len(li2))
# Judge status: Accepted
a,b,c,d = map(int,input().split())
if a>=0 and c>=0:
    print(b*d)
elif a>=0 and c<0<=d:
    print(b*d)
elif a>=0 and d<0:
    print(a*d)
elif a<0<=b and c>=0:
    print(b*d)
elif a<0<=b and c<0<=d:
    print(max(b*d,a*c))
elif a<0<=b and d<0:
    print(a*c)
elif b<0 and c>=0:
    print(b*c)
elif b<0 and c<0<=d:
    print(a*c)
elif b<0 and d<0:
    print(a*c)
# Judge status: Wrong Answer
N, Q = map(int, input().split())
S = input()
qn = [list(map(int, input().split())) for _ in range(Q)]
S = "0" + S
cnt = []
cnt.append(0)
for i in range(1, N+1):
    if (S[i-1:i+1] == "AC"):
        cnt.append(cnt[i-1] + 1)
    else:
        cnt.append(cnt[i-1])
for q in qn:
    ans = cnt[q[1]] - cnt[q[0]-1]
#    if S[q[0]-1:q[0]+1] == "AC":
#        ans -= 1
    print(ans)
# Judge status: Accepted
X, Y = [int(x) for x in input().split()]
M = 10**9+7
if (X + Y) % 3:
  print(0)
else:
  x = X - (X+Y)//3
  y = Y - (X+Y)//3
  if x < 0 or y < 0:
    print(0)
  else:
    #print(x, y)
    #x+y c x
    #(x+y)!/x!/y!
    ans = 1
    for j in range(y):
      #print(j)
      #print(x+j+1, j+1)
      ans *= (x+j+1) * pow(j+1, -1, M)
      ans %= M
    print(ans)
# Judge status: Accepted
X = int(input())
m = 100
ans = 0
while X > m:
    m += int(m*0.01)
    ans += 1

print(ans)
# Judge status: Accepted
n = int(input())
p = [int(x) for x in input().split()]
ans = 0
for i in range(n-1):
    if p[i] == i + 1:
        ans += 1
        p[i], p[i+1] = p[i+1], p[i]
if p[-1] == n: ans += 1
print(ans)
# Judge status: Accepted
X,Y = map(int,input().split())
print(X+Y//2)
# Judge status: Accepted
s = input().split()
a, b, m = int(s[0]), int(s[1]), int(s[2])

a_list = [int(i) for i in input().split()]
b_list = [int(i) for i in input().split()]

ans = min(a_list) + min(b_list)

for i in range(m):
    ss = input().split()
    temp = a_list[int(ss[0])-1] + b_list[int(ss[1])-1] - int(ss[2])
    if ans > temp:
        ans = temp

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

ans = 'No'
# Nが偶数のときを考えればよい
if N % 2 == 0:
  if S[:N // 2] == S[N // 2:]: ans = 'Yes'
    
print(ans)
# Judge status: Accepted
import numpy as np
from math import ceil,log2
N = int(input())
a = np.array(list(map(int,input().split())),dtype=np.int64)
ans = 0
count = 1
if max(a) == 0:
    x = 1
else:
    x = ceil(log2(max(a)))

for i in range(x):
    b = a%2
    s = np.count_nonzero(b==1)*np.count_nonzero(b==0)*count
    ans +=s
    count *= 2
    a = a//2
    ans %= 10**9+7
print(ans)