Harryxun/stf_run huggingface dataset:
def divide(x, y):
    s = 1
    if(x < 0):s *= -1
    if(y < 0):s *= -1
    if x == 0:exit()
    return abs(x) / abs(y) * s     
 
def _split(_src):
    c = 0
    l = len(_src)
    if l == 0:
        return []
    while c < l and ord('0') <= ord(_src[c]) <= ord('9'):
        c += 1
    if c == 0:
        tmp = _split(_src[1:])
        if tmp != [] and tmp[0] == "-":
            tmp = ["(", 0 , "-", 1, ")", "*"] + tmp[1:]
        return [_src[0]] + tmp
    else:
        return [int(_src[:c])] + _split(_src[c:])
         
 
def evaluate(src):
    if len(src) == 1:
        return src[0]
         
    if "(" in src:
        l = src.index("(")
        r = src.index(")")
        mid = evaluate(src[l + 1:r])
        return evaluate( src[:l] + [mid] + src[r + 1:])
     
    operators = [("+", lambda x,y:x + y),
                 ("-", lambda x,y:x - y),
                 ("*", lambda x,y:x * y),
                 ("/", divide)
                ]  
     
    for (op,func) in operators:
        if op in src:
            p = src.index(op)
            l = evaluate(src[:p])
            r = evaluate(src[p + 1:])
            return func(l, r)
     
for t in xrange(input()):
    _src = "0+" + raw_input().strip("=")
    src = _split(_src)
    print evaluate(src)

### FIXED CODE ###

def divide(x, y):
    s = 1
    if(x < 0):s *= -1
    if(y < 0):s *= -1
    return abs(x) / abs(y) * s     

operator = {"+":(lambda x,y: x+y),
            "-":(lambda x,y: x-y),
            "*":(lambda x,y: x*y),
            "/":divide
            }

def ind(src, x):
    if x not in src:return 1<<30
    return src.index(x)
 
def _split(_src):
    c = 0
    l = len(_src)
    if l == 0:
        return []
    while c < l and ord('0') <= ord(_src[c]) <= ord('9'):
        c += 1

    if c == 0:
        return [_src[0]] + _split(_src[1:])
    else:
        return [int(_src[:c])] + _split(_src[c:])
         
 
def evaluate(src):
    if len(src) == 1:
        return src[0]
         
    if "(" in src:
        l = src.index("(")
        r = l
        st = 1
        while st:
            r += 1
            if src[r] == "(": st += 1
            if src[r] == ")": st -= 1
        
        mid = evaluate(src[l + 1:r])
        return evaluate( src[:l] + [mid] + src[r + 1:])
    
    pos = min(ind(src, "*"), ind(src,"/"))
    if(pos == 1<<30):
        pos = min(ind(src, "+"), ind(src, "-"))
    op = src[pos]
    l, r = src[pos - 1], src[pos + 1]
    mid = operator[op](l, r)
    return evaluate(src[:pos - 1] + [mid] + src[pos + 2:])

     
for t in xrange(input()):
    _src = raw_input().strip("=")
    src = _split(_src)
    print evaluate(src)
import itertools
n, m, x = map(int, input().split())
T = [list(map(int, input().split())) for _ in range(n)]

A = list(range(1, n + 1))
flag1 = True
ans = -1

for i in range(1, n + 1):
    if i == 1:
        for j in range(n):
            flag = True
            for k in range(m):
                if T[j][k] < x:
                    flag = False
                    break

            if flag == True and flag1 == True:
                ans = T[j]
                flag1 = False
            elif flag == True:
                ans = min(ans, T[j])

    else:
        tmp = list(itertools.combinations(range(1, n + 1), i))
        for j in range(len(tmp)):
            flag = True
            M = [0] * m
            tmp1 = 0
            for k in range(len(tmp[j])):
                for l in range(m):
                    M[l] = M[l] + T[tmp[j][k] - 1][l + 1]
                tmp1 = tmp1 + T[tmp[j][k] - 1][0]

            for k in range(m):
                if M[k] < x:
                    flag = False
                    break

            if flag == True and flag1 == True:
                ans = tmp1
                flag1 = False
            elif flag == True:
                ans = min(ans, tmp1)


print(ans)

### FIXED CODE ###

import itertools
n, m, x = map(int, input().split())
T = [list(map(int, input().split())) for _ in range(n)]

flag1 = True
ans = -1

for i in range(1, n + 1):
    if i == 1:
        for j in range(n):
            flag = True
            for k in range(m):
                if T[j][k + 1] < x:
                    flag = False
                    break

            if flag == True and flag1 == True:
                ans = T[j][0]
                flag1 = False
            elif flag == True:
                ans = min(ans, T[j][0])

    else:
        tmp = list(itertools.combinations(range(1, n + 1), i))
        for j in range(len(tmp)):
            flag = True
            M = [0] * m
            tmp1 = 0
            for k in range(len(tmp[j])):
                for l in range(m):
                    M[l] = M[l] + T[tmp[j][k] - 1][l + 1]
                tmp1 = tmp1 + T[tmp[j][k] - 1][0]

            for k in range(m):
                if M[k] < x:
                    flag = False
                    break

            if flag == True and flag1 == True:
                ans = tmp1
                flag1 = False
            elif flag == True:
                ans = min(ans, tmp1)

print(ans)
import math


if __name__ == '__main__':
    radius = int(input())

    area = radius**2 * math.pi
    perimeter = 2 * radius * math.pi

    print('{0:.6f} {1:.6f}'.format(area, perimeter))

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_4_B&lang=jp

"""
import sys
from sys import stdin
from math import pi
input = stdin.readline


def main(args):
    r = float(input())
    print('{:.6f} {:.6f}'.format(r**2*pi, 2*pi*r))


if __name__ == '__main__':
    main(sys.argv[1:])
N,K = map(int,input().split())
beki_2 = list()
for i in range(16):
    beki_2.append(2**i)
    # print(beki_2)
eachother = [0]*N
ind = 0
i = 0
# print(beki_2)
f =0
while all:
    if(i == 0):
        j = 0
        while all:
            if(1*beki_2[j] >= K):
                ind = j
                # print("i")
                eachother[i] = ind
                break
            # print(j,beki_2[j])
            j+=1
        i+=1
    else:
        # print(i+1,beki_2[ind])
        if((i+1)*beki_2[ind]<K):
            eachother[i] = ind+1
            i +=1
        # print((i+1)*beki_2[ind],ind,i)
        if(ind == 0):
            i+=1
        ind -= 1


    if(i == N or ind == 0):
        # print(i,N)
        break
sum_each = 0.0

for i in range(len(eachother)):
    sum_each+=beki_2[eachother[0]]/beki_2[eachother[i]]
print((1/N)*sum_each/beki_2[eachother[0]])
# print(eachother)
# (1/N)*()

### FIXED CODE ###

N,K = map(int,input().split())

two_beki = [1]*20
for i in range(1,20):
    two_beki[i] = 2**i
#[1,2,4,8,16,32,64,128,256,512,1024,2048,8192,16384]
n = N+1
list_index = list()
for I in range(1,n):
    for J in range(20):
        if(I*two_beki[J]>=K):
            list_index.append(J) 
            # print(J,I*two_beki[J])
            break
#print(list_index)
sum_harf = 0.0
for I in list_index:
    sum_harf += 1/two_beki[I]/N
print(sum_harf)
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ans = 0

a_sum = [0]
for i, minute in enumerate(a):
        a_sum.append(a_sum(i)+minute)
b_sum = [0]
for i, minute in enumerate(b):
        b_sum.append(b_sum(i)+minute)

B = m
ans_list = []

for i in a_sum:
        if i > k:
                ans_list.append(i)
                continue
        for j in b_sum[::-1]:
                if j <= k-i:
                        ans_list.append(i+B)
                        break
                elif j > k-i:
                        B -= 1

print(max(ans_list))


### FIXED CODE ###

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

a, b = [0], [0]
for i in range(N):
        a.append(a[i]+A[i])
for i in range(M):
        b.append(b[i]+B[i])

ans, j = 0, M

for i in range(N+1):
        if a[i] > K:
                break
        while b[j] > K - a[i]:
                j -= 1
        ans = max(ans, i+j)

print(ans)
S = input().split()
D = int(S[0])
N = int(S[1])
if N <> 100:
    Ans = N*(100**D)
else:
    Ans = (N-1)*(100**D)
print(Ans)

### FIXED CODE ###

S = input().split()
D = int(S[0])
N = int(S[1])
if N != 100:
    Ans = N*(100**D)
else:
    Ans = (N+1)*(100**D)
print(Ans)
n = int(input())
a = list(map(int,input().split()))
x = min(3000,gcd(_ for _ in a))
m = [0]*x

for i in range(x):
    for j in a:
        m[i] += m%j

print(max(m))

### FIXED CODE ###

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

print(sum(a)-n)
t=int(input())
for j in range(t):
  n,k=map(int,input().split())
  l=list(map(int,input().split()))
  l1=[]
  for i in range(n-1):
      l1.append(l[i+1]-l[i])
  l1=sorted(l1)
  for i in range(k-1):
    del l1[-1]
  s=0
  for i in l1:
      s+=i
  print(s)


### FIXED CODE ###

t=int(input())
for j in range(t):
  n,k=map(int,input().split())
  l=list(map(int,input().split()))
  l1=[]
  for i in range(n-1):
      l1.append(l[i+1]-l[i])
  l1=sorted(l1)
  if n<=k:
    print(0)
  else:
    for i in range(k-1):
      del l1[-1]
    s=0
    for i in l1:
        s+=i
    print(s)
N, K = map(int, input().split())
Hs = map(int,input().split())
print(sum(sorted(Hs, reverse=True)[K::]))

### FIXED CODE ###

import math

H, A = [int(x) for x in input().split()]
print(math.ceil(H/A))
from sys import stdin

def main():
  read = stdin.readline
  N = int(read())
  data = list(map(int,read().split(" ")))
  ans = 1
  for i in data:
    if ans > 10**18/i:
      print("-1")
    else:
      ans *= i
      
    
  print(ans)
  
  
if __name__ == "__main__":
  main()

### FIXED CODE ###

from sys import stdin

def main():
  read = stdin.readline
  N = int(read())
  data = list(map(int,read().split(" ")))
  ans = 1
  flg = False
  if 0 in data:
    print("0")
    flg = True
    exit()
  for i in data:
    
    if ans*i > 10**18:
      print("-1")
      flg = True
      break
    else:
      ans *= i
      
  if not flg:  
    print(ans)
  
  
if __name__ == "__main__":
  main()
a,_,b=input().split()
print("DH"[a==b])

### FIXED CODE ###

a,b=input().split()
print("DH"[a==b])
N,x=map(int,input().split())
a=[int(x) for x in input().split()]
a.sort()
set_a=list(set(a))
if N % 2 ==0:
	for i in range(N):
		a[i] != 2*(i // 2) + 1
		print(0)
		exit(0)
else:
	if a[0] != 0:
		print(0)
		exit(0)
	else:
		for i in range(1,N):
			a[i] != 2(i+1 // 2) +1
			print(0)
			exit(0)
if N % 2==1:
	len=len(set_a)-1
else:
	len=len(set(a))
ans=2**len
print(ans)

### FIXED CODE ###

import numpy as np
MOD = 10**9 + 7
N = int(input())
A = np.array([int(x) for x in input().split()])

left = np.arange(N)
right = N-1-left
cnt_1 = np.bincount(np.abs(left-right))
cnt_2 = np.bincount(A)

if cnt_1.shape != cnt_2.shape or (cnt_1 != cnt_2).any():
  answer = 0
else:
  answer = pow(2, N//2, MOD)
  
print(answer)
T_plus = T[-1]
T_a = T[:-1]

if S == T_a:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

S = input()
T = input()

T_plus = T[-1]
T_a = T[:-1]

print("Yes" if S==T_a else "No")
import math
n, d = map(int, input().split())
lst1 = []
lst2 = []
ans = 0
for i in range(n):
  x, y = map(int, input().split())
  # lst2 =[x, y]
  # list1.append(lst2)
  cal = math.sqrt(x^2+y^2)
  lst1.append(cal)
  
for i in range(n):
  if lst1[i] >= d:
    ans += 1
  else:
    continue:
print(ans)

### FIXED CODE ###

import math
N,D= map(int, input().split(" "))
count = 0
for i in range(0,N):
    X,Y= map(int, input().split(" "))
    d= math.sqrt(pow(X,2)+pow(Y,2))
    if d<= D:
        count = count+1
print(count)
k,s=map(int,input().split())
c=0
for i in range(k+1):
    for j in range(k+1):
        if s>=i+j and s-(i+j)<=k:
            c+=1
print(c)

### FIXED CODE ###

print(input().replace(',',' '))
k, x = map(int, input().split())
ans = [i - 1 for i in range(1, k)]
cache = [i + 1 for i in range(1, k)]
print(*sorted((ans + cache).append(x)))

### FIXED CODE ###

k, x = map(int, input().split())
ans = [x]
for i in range(1, k):
    ans.append(x - i)
    ans.append(x + i)
print(*sorted(ans))
import sys
if sys.argv[-1] == 'ONLINE_JUDGE':
    import os
    import re
    with open(__file__) as f:
        source = f.read().split('###''nbacl')
    for s in source[1:]:
        s = re.sub("'''.*", '', s)
        sp = s.split(maxsplit=1)
        if os.path.dirname(sp[0]):
            os.makedirs(os.path.dirname(sp[0]), exist_ok=True)
        with open(sp[0], 'w') as f:
            f.write(sp[1])

    import nbmodule
    nbmodule.cc.compile()
    exit(0)

from nbmodule import solve
import numpy as np
i8 = np.int64
i4 = np.int32


def main():
    f = open('d4.txt')
    N, K = [int(x) for x in f.readline().split()]
    LR = np.fromstring(f.read(), i8, sep=' ').reshape((-1, 2)).T.copy()
    L = LR[0]
    R = LR[1]
    arg = np.argsort(L)
    left = L[arg]
    right = R[arg]
    w = right - left + 1
    ans = solve(N, left, w)
    print(ans)


if __name__ == '__main__':
    main()

'''
###nbacl nbmodule.py
import numpy as np
from numba import njit
from numba.types import i8, i4
from numba.pycc import CC
ni4 = np.int32
ni8 = np.int64
cc = CC('nbmodule')

MOD = 998244353


@cc.export('solve', (i8, i8[:], i8[:]))
def solve(N, left, w):
    l0 = w.max()
    dp_len = N + l0
    dp_prev = np.zeros(dp_len, ni8)
    dp_prev[l0] = 1
    dp = np.zeros(dp_len, ni8)
    left_min = left[0]
    ret = 0
    while l0 + left_min < dp_len:
        for k in range(left.shape[0]):
            pre = 0
            for i in range(l0 + left[k], dp_len):
                cur = pre + dp_prev[i - left[k]] - dp_prev[i - left[k] - w[k]]
                dp[i] += cur
                pre = cur
        ret += dp[-1]
        dp_prev, dp = dp, dp_prev
        dp_prev %= MOD
        dp.fill(0)
        l0 += left_min

    return ret % MOD

if __name__ == '__main__':
    cc.compile()
'''



### FIXED CODE ###

import numpy as np
from numba import njit
from numba.types import i8
ni8 = np.int64
MOD = 998244353


@njit((i8[:,::-1], i8[:], i8, i8), cache=True)
def solve(lr, dp, n, k):
    acc_dp = np.ones_like(dp)
    for i in range(1, n):
        val = 0
        for j in range(k):
            a = i - lr[j, 0]
            if a < 0:
                continue
            b = i - lr[j, 1] - 1
            val += acc_dp[a] - (acc_dp[b] if b >= 0 else 0)
        dp[i] = val % MOD
        acc_dp[i] = (acc_dp[i - 1] + dp[i]) % MOD
    return dp[n - 1]


def main():
    f = open(0)
    n, k = [int(x) for x in f.readline().split()]
    lr = np.fromstring(f.read(), ni8, sep=' ').reshape((-1, 2))
    dp = np.zeros(n, ni8)
    dp[0] = 1
    ans = solve(lr, dp, n, k)
    print(ans)

main()
def main()
  N=int(input())
  S=input()
  n=len(S)
  if n%2==0:
    if S[i]==S[n/2+i] for all(i in range(n/2)):
      print("Yes")
    else:
      print("No")
  else:
    print("No")
      

### FIXED CODE ###

def main():
  N=int(input())
  S=input()
  n=len(S)
  T=S[0:n//2]
  if n%2==0:
    if S==T+T:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
main()
while True:
    a = int(input())
    c = str(input())
    b = int(input())
    if(c == '+'):
        print(a + b)
    elif(c == '-'):
        print(a - b)
    elif(c == '*'):
        print(a * b)
    elif(c == '/')
        print(a / b)
    else:
        break


### FIXED CODE ###

while True:
    a, b, c = map(str, input().split())
    a = int(a)
    c = int(c)
    if(b == '+'):
        print(a + c)
    elif(b == '-'):
        print(a - c)
    elif(b == '*'):
        print(a * c)
    elif(b == '/'):
        print(a // c)
    else:
        break
N = int(input())
A = [list(map(str,input().split()) for i in range(N))]
mod = 10**9+7
ans=0
for i in range(2**N):
  cl = [False]*N
  for j in range(N):
    if ((i>>j)&1):
      cl[N-1-j] = True
  total=''
  if cl.count(True) == 2:
    for k in range(len(cl)):
      if cl[k]:
        total+= A[k] + '*'
      total+= '1'
  ans += eval(total)

print(ans%mod)


### FIXED CODE ###

mod=10**9 + 7
n=int(input())
a=list(map(int,input().split()))
ans=0
total=sum(a)
for i in a:
  total -= i
  ans += total*i
print(ans%mod)
import math

a,b,c,d = map(int,input().split())
lcm = c * d / math.gcd(c , d) 

if a % c == 0:
    c_start = int(a/c)
else:
    c_start = int(a/c)+1

if a % d == 0:
    d_start = int(a/d)
else:
    d_start = int(a/d)+1

if a % lcm == 0:
        lcm_start = int(a/lcm)
else:
        lcm_start = int(a/lcm)+1

c_end = int(b/c)
d_end = int(b/d)
lcm_end = int(b/lcm)

c_num = c_end - c_start + 1
d_num = d_end - d_start + 1
lcm_num=lcm_end - lcm_start + 1

print(b - a + 1 - c_num - d_num + lcm_num)


### FIXED CODE ###

import fractions

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

def calc(n):
    return n-n//c-n//d+n//(c*d//fractions.gcd(c, d))

print(calc(b)-calc(a-1))
N, M = map(int, input().split())
edgelist = []
for i in range(N):
    edgelist.append(set(map(int, input().split())))

s = [1]
count = 0
L = [[i for i in edgelist if (len(i&set([1]))!=0)]]
while s != []:
    if len(s) == M:
        count = count + 1
        L.pop()
        s.pop()
    elif L[-1] == []:
        L.pop()
        s.pop()
    else:
        p = L[-1].pop()
        r = list(p - set([s[-1]]))
        L.append([i for i in edgelist if (len(i&set(r))!=0)*(len(i&set(s))==0)])
        s.append(r[0])
print(count)

### FIXED CODE ###

N, M = map(int, input().split())
edgelist = []
for i in range(M):
    edgelist.append(set(map(int, input().split())))

s = [1]
count = 0
L = [[i for i in edgelist if (len(i&set([1]))!=0)]]
while s != []:
    if len(s) == N:
        count = count + 1
        L.pop()
        s.pop()
    elif L[-1] == []:
        L.pop()
        s.pop()
    else:
        p = L[-1].pop()
        r = list(p - set([s[-1]]))
        L.append([i for i in edgelist if (len(i&set(r))!=0)*(len(i&set(s))==0)])
        s.append(r[0])
print(count)
R,G,B,N = map(int,input().split())
cnt = 0
for r in range(3001):
  for g in range(3001):
    V = r * R + g * G 
    if N > V and (N - V) % == 0
        cnt += 1
    else:
        continue
print(cnt)

### FIXED CODE ###

R,G,B,N = map(int,input().split())
cnt = 0
for r in range((N // R) + 1):
    for g in range((N - (r * R)) // G + 1):
        V = N - (r * R + g * G)
        if V >= 0 and V % B == 0:
            cnt += 1
print(cnt)
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math

# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N = inputInt()
    A = inputList()
    
    ans = [0 for i in range(N)]
    ans_cnt = 0
    ans_str = ""
    for i in range(N, 0, -1):
        cons = 0
        for j in range(i, N+1, i):
            cnt ^= ans[j-1]
        if A[i-1] == 1 and cons % 2 == 0:
            ans[i-1] = 1
            ans_cnt += 1
            ans_str = ans_str + str(i) + " "
            continue
        if A[i-1] == 0 and cons % 2 == 1:
            ans[i-1] = 1
            ans_cnt += 1
            ans_str = ans_str + str(i) + " "
            continue
            
    print(ans_cnt)
    print(ans_str)
            	
if __name__ == "__main__":
	main()


### FIXED CODE ###

import sys
 
def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7
 
N=INT()
A=LIST()
 
# その位置にボールを入れるかを保持するA2
A2=[0]*N
B=[]
# 後ろから決めていく
for i in range(N-1, -1, -1):
    cur=i+1
    cnt=0
    # curの倍数を全部見に行く
    for j in range(cur*2, N+1, cur):
        cnt^=A2[j-1]
    # ボールを入れるべきかどうか
    if A[i]!=cnt:
        B.append(cur)
        A2[i]=1
 
print(len(B))
print(*B)
# coding:utf-8
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
default_A = A.copy()
counted = list(map(lambda x:x*0, list(range(10))))

'''
counted2 = [[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9]]
for a in A:
    counted2[a-1][0] += 1
count2 = 0
for i in range(10):
    if counted2[i][0]>0:
        count2 += 1

iranai = count2-K
min_2 = 1<<15
min_number = []
for i in range(len(counted2)):
    for j in range(len(counted2)-1, i, -1):
        if counted2[j][0] < counted2[j-1][0]:
            counted2[j], counted2[j-1] = counted2[j-1], counted2[j]

for i in range(10):
    if counted2[0][0] == 0:
        counted2.pop(0)

last_min = 0
if iranai > 0:
    for i in range(iranai):
        last_min += counted2[i][0]
    print(last_min)
else:
    print(0)
'''


def BallCount(A):
    global counted
    for a in A:
        counted[a-1] += 1
    count = 0
    for i in range(10):
        if counted[i]>0:
            count+=1
    #print("count ",count, "A ", A)
    counted = [0,0,0,0,0,0,0,0,0,0]
    return count

#print(BallCount(A))
min_ = 1<<15
def func(reciveA):
    change_count = 0
    global default_A
    for i in range(N):
        #print("reciveA[i] ", reciveA[i] , "A[i] " ,default_A[i])
        if reciveA[i]!=default_A[i]:
            change_count += 1

        #print("change count", change_count)
    global min_
    min_ = min(min_, change_count)


def bfs(pos):
    ballcount = BallCount(A)

    if ballcount==K:
        #print("ballcount ",ballcount )
        func(A)
    if pos==N:
        return
    for i in default_A:
        A[pos] = i
        bfs(pos+1)
    
bfs(0)
if min_ == (1<<15):
    print(0)
else:
    print(min_)


### FIXED CODE ###

# coding:utf-8
#masu = map(float, input().split())
masu = input()
count = 0
for be in masu:
    be_ = int(be)
    if be_==1:
        count+=1

print(count)
import sys
import numpy as np

from collections import deque 
from functools import reduce

# input = sys.stdin.readline

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

p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

list.sort(p, reverse=True)
list.sort(q, reverse=True)
list.sort(r, reverse=True)

p_np = np.zeros(999999)
q_np = np.zeros(999999)

if len(p) > x:
    p_np[:x] = p[:x]
else:
    p_np[:len(p)] = p[:]

if len(q) > y:
    q_np[:y] = q[:y]
else:
    q_np[:len(q)] = q[:]    

ap_np = np.hstack((p_np[:x], q_np[:y]))
ap_np.sort()
ap_cnt = 0

for i, ri in enumerate(r):
    if (r[i] > ap_np[i]):
        ap_np[i] = r[i]
    if i >= x + y:
        break
print(int(ap_np.sum()))

### FIXED CODE ###

import sys
import numpy as np

from collections import deque 
from functools import reduce

# input = sys.stdin.readline

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

p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

list.sort(p, reverse=True)
list.sort(q, reverse=True)
list.sort(r, reverse=True)

p_np = np.zeros(999999)
q_np = np.zeros(999999)

if len(p) > x:
    p_np[:x] = p[:x]
else:
    l_p = len(p)
    p_np[:l_p] = p[:]

if len(q) > y:
    q_np[:y] = q[:y]
else:
    l_q = len(q)
    q_np[:l_q] = q[:]
ap_np = np.hstack((p_np[:x], q_np[:y]))
ap_np.sort()
ap_cnt = 0

for i, ri in enumerate(r):
    if i >= x + y:
        break
    if (r[i] > ap_np[i]):
        ap_np[i] = r[i]
print(int(ap_np.sum()))
S = int(input())
a = S//3
b = a * 0.8
c = a * 1.2
ans = a * b * c
ans = ans * 1.0416666666666666
print("{0:.7f}".format(ans))

### FIXED CODE ###

N, M = map(int, input().split())
a = []
b = []
if M == 0:
    for i in range(1,(2*N)+1):
        if i%2==0 and i>0:
            a.append(i)
elif N == 0:
    for i in range(1,(2*M)+1):
        if i%2==1:
            b.append(i)
else:
    for i in range(1,501):
        if i%2==0 and i>0:
            a.append(i)
        else:
            b.append(i)
c = a[:N] + b[:M]
l = []
num = 1
for i in range(len(c)-1):
    for j in range(num,len(c)):
        res = c[i] + c[j]
        l.append(res)
    num+=1

k=[i for i in l if i%2==0]
print(len(k))