Harryxun/stf_run huggingface dataset:
import numpy as np
import copy

N= int(input())
S=input()
SS= copy.copy(S)
S = list(S)
#N, A, B = map(int, input().split())

flag = 1
#print(len(S))
while flag == 1:
    flag = 0
    flag2 = 1
    i = 0
    while flag2:
    # for i in range(len(S)-1):
        #print(i)
        if S[i]=="(" and S[i+1] ==")":
            flag = 1
            del S[i] 
            del S[i+1]
            i -= 2
        i += 1
        i = max(0,i)
        if i>=len(S):
            flag2 = 0
a=0
b=0
for i in range(len(S)):
    if S[i]=="(":
        b+=1
    elif S[i]==")":
        a+=1
#print(S)
# initialization of string to ""
A = ""
B = ""

# traverse in the string
for x in range(a):
    
    A += "("   
for x in range(b):    
    B += ")"   

        
#print(str(A)+SS+str(B))
print(A+SS+B)
    


### FIXED CODE ###

import numpy as np
import copy

N= int(input())
S=input()
SS= copy.copy(S)
S = list(S)
#N, A, B = map(int, input().split())

flag = 1
#print(len(S))
while flag == 1:
    flag = 0
    flag2 = 1
    i = 0
    while flag2 and len(S)>1:
    # for i in range(len(S)-1):
        #print(S)
        if S[i]=="(" and S[i+1] ==")":
            # print(S, i)
            flag = 1
            del S[i] 
            del S[i]
            i -= 1
            # print(S, i)
        i += 1
        i = max(0,i)
        if i+1>=len(S):
            flag2 = 0
a=0
b=0
for i in range(len(S)):
    if S[i]=="(":
        b+=1
    elif S[i]==")":
        a+=1
#print(S)
# initialization of string to ""
A = ""
B = ""

# traverse in the string
for x in range(a):
    
    A += "("   
for x in range(b):    
    B += ")"   

        
#print(str(A)+SS+str(B))
print(A+SS+B)
n=int(input())
a=list(map(int,input().split()))
b=sorted(b)
for i in range(1,n+1):
  print(b.count(i))
  b=b[b.count(i):]


### FIXED CODE ###

from collections import Counter
n = int(input())
c = Counter(map(int, input().split()))
for i in range(n):
  print(c[i + 1])
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

x = A + V * T
y = B + W * T

if X >= y:
  print('YES')
else:
  print('NO')

### FIXED CODE ###

A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

x = A + V * T
y = B + W * T

z = A - V * T
w = B - W * T

if A < B:
  if x >= y:
    print('YES')
  else:
    print('NO')
else:
  if z <= w:
    print('YES')
  else:
    print('NO')
n, x = map(int, input().split())
while(n != 0 or x != 0):
    count = 0
    for i in range(1, n-1):
        for j in range(i+1, n):
            if x - i - j > j and x - i - j <= n:
                count += 1
    print(count)
    n, x = map(int, input().split())


### FIXED CODE ###

N = int(input())
ans = 0
for i in range(1, N+1, 2):
    count = 0
    for j in range(1, int(i ** 0.5) + 1):
        if i % j == 0:
            count += 2
    if int(i ** 0.5) ** 2 == i:
        count -= 1
    if count == 8:
        ans += 1
print(ans)
a, b = (map(int, input()))
if a == b:
    print(a * 2)
else:
    c = max(a, b)
    print(c * (c - 1))

### FIXED CODE ###

a, b = (map(int, input().split()))
if a == b:
    print(a * 2)
else:
    c = max(a, b)
    print(c * 2 - 1)
K = int(input())
X = int(input())

if 500*x >= X:
    print("Yes")
else:
    print("No")



### FIXED CODE ###

K,X = map(int,(input().split()))
if 500*K >= X:
    print("Yes")
else:
    print("No")
list1 = [int(a) for a in input().split()]
list1_0 = list1[0] #AB
list1_1 = list1[1] #BC
list1_2 = list1[2] #CA

if (list1_0 * list1_1 // 2) > 1:
    print(list1_0 * list1_1 // 2)
else:
    print(list1)

### FIXED CODE ###

list1 = [int(a) for a in input().split()]
list1_0 = list1[0] #A
list1_1 = list1[1] #B

if (list1_1 % list1_0) == 0:
    print(list1_0 + list1_1)
else:
    print(list1_1 - list1_0)
s=input()
def check(s):
    if s=="":
        return True
    else:
        if len(s)>=7:
            if s[-5:]=="dream" or s[-5:]=="erase":
                    s=s[:-5]
                    return check(s)
                
            elif s[-7:]=="dreamer":
                    s=s[:-7]
                    return check(s)
                
            elif s[-6:]=="eraser":
                    s=s[:-6]
                    return check(s) 
                
                
        elif len(s)==6:
            if s[-6:]=="eraser":
                return True
            
            else:
                return False
            
        elif len(s)==5:
            if s[-5:]=="dream" or s[-5:]=="erase":
                return True
            
            else:
                return False
            
        else:
            return False
        
if check(s):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

s=input()
length=len(s)

s=s[::-1]

s=s+"WWWWWWW"

index=0
flag=True
while index<length:
    if s[index]=="m" and s[index+1]=="a" and s[index+2]=="e" and s[index+3]=="r" and s[index+4]=="d":
        index+=5
    elif s[index]=="e" and s[index+1]=="s" and s[index+2]=="a" and s[index+3]=="r" and s[index+4]=="e":
        index+=5   
    elif s[index]=="r" and s[index+1]=="e" and s[index+2]=="m" and s[index+3]=="a" and s[index+4]=="e" and s[index+5]=="r" and s[index+6]=="d":
        index+=7   
    elif s[index]=="r" and s[index+1]=="e" and s[index+2]=="s" and s[index+3]=="a" and s[index+4]=="r" and s[index+5]=="e":
        index+=6
    else:
        flag=False
        break
if flag:
    print("YES")
else:
    print("NO")
a =[]
for i in range(4):
 a[i] = int(input())
print((min(a[0],a[1])+min(a[2],a[3])))


### FIXED CODE ###

a =[]
for i in range(4):
 a.append(int(input()))
print((min(a[0],a[1])+min(a[2],a[3])))
N = int(input())
L = []
for l in range(N):
	L.append(int(input()))

maxL = max(L)
num = ["n"] * N

if L.count(maxL) >= 2:
	for i in range(N):
		print(maxL)
		
else:
	L = L.remove(maxL)
	secL = max(L)
	
	for i in range(N):
		if i in num:
			print(secL)
		else:
			print(maxL)


### FIXED CODE ###

N = int(input())
L = []
for l in range(N):
	L.append(int(input()))

maxL = max(L)
subL = L
num = ["n"] * N

if L.count(maxL) >= 2:
	for i in range(N):
		print(maxL)
		
else:	
	for i in range(N):
		if L[i] == maxL:
			L[i] = 0
			print(max(L))
		else:
			print(maxL)
a, b, c = input().split(",")

print(a b c)



### FIXED CODE ###

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

print(a,b,c)
import sys

n = sys.stdin.readlines()
print(n + n ** 2 + n ** 3)

### FIXED CODE ###

a = int(input())
print(a + a**2 + a ** 3)
def mod_(b, n, mod):
    res = 1
    while n > 0:
        if n & 1:
            res = res * b % mod
        b = b * b % mod
        n >>= 1
    return int(res)

def main():

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

    n = ((N+1) >> 1)
    li = [0]*n



    for a in A:
        if li[a >> 1] >= 2:
            print(0)
            break
        else:
            li[a >> 1] += 1

    if N & 1:
        if li[0] != 1:
            print(0)
        elif li.count(2) != n-1:
            print(0)
        else:
            c = n-1
            print(2 ** c % (1E9+7))
    else:
        if li.count(2) != n:
            print(0)
        else:
            c = n
            print(2 ** c % (1E9+7))

main()

### FIXED CODE ###


def mod_(b, n, mod):
    res = 1
    while n > 0:
        if n & 1:
            res = res * b % mod
        b = b * b % mod
        n >>= 1
    return int(res)

def main():

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

    n = ((N+1) >> 1)
    li = [0]*n



    for a in A:
        li[a >> 1] += 1

    if N & 1:
        if li[0] != 1:
            print(0)
        elif li.count(2) != n-1:
            print(0)
        else:
            c = n-1
            print(2 ** c % (10**9+7))
    else:
        if li.count(2) != n:
            print(0)
        else:
            c = n
            print(2 ** c % (10**9+7))

main()
n = int(input())
A = map(int, input().split())
 
ai = max(A)
A.remove(ai)
 
Asub = [abs(ai/2 -a) for a in A]
aj = A[Asub.index(min(Asub))]
 
print('{} {}'.format(ai, aj))

### FIXED CODE ###

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

ai = max(A)
A.remove(ai)

Asub = [abs(ai/2 -a) for a in A]
aj = A[Asub.index(min(Asub))]

print('{} {}'.format(ai, aj))
N=int(input())
A=sorted(list(map(int,input().split())))

C=[1 for i in range(220000)]
for i in range(N):
    if C[A[i]]==0:
        continue
    for j in range(2,220000//A[i]-1):
        C[A[i]*j]=0

ans=0
for i in range(N):
    if i!=N-1 and A[i]==A[i+1]:
        C[A[i]]=0
        continue
    if C[A[i]]==1:
        ans+=1
        C[A[i]]=0

print(ans)

### FIXED CODE ###

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

C=[1 for i in range(10**6+1)]
for i in range(N):
    if C[A[i]]==0:  #すでに割り切るものがあるとわかった場合
        continue
    if C[A[i]]==-1:  #同じ数字を2回目に通った時
        C[A[i]]=0
        continue
    C[A[i]]*=-1  #通ったの印
    j=2
    while A[i]*j<=10**6:  #それの倍数はすべてダメ
        C[A[i]*j]=0
        j+=1

print(C.count(-1))
a = int(raw_input())
b = int(raw_input())
 
if a != 3 && b != 3:
  print(3)
else if a != 2 && B != 2:
  print(2)
else:
  print(1)

### FIXED CODE ###

a = int(input())
b = int(input())
 
if (a != 1 and b != 1):
  print(1)
elif (a != 2 and b != 2):
  print(2)
else:
  print(3)
x, y = list(map(int, input().split(' ')))
# K馬(右上のみ) -> パスカルの三角形っぽい
mmm = 1000000000 + 7
sss = x + y
if sss % 3 != 0:
    print(0)
    exit()
hoge = sss // 3
# 上にp, 右にq
# 2p + q = y
# 2q + p = x
# p + q = hoge
# p = y - hoge
# q = x - hoge
p =  y - hoge
q = x - hoge
#print(hoge, p, q)
# 二項係数 mod [検索]
fac = []
inv = []
inv_fac = []
def init(n):
    fac.append(1)
    fac.append(1)
    inv.append(0)
    inv.append(1)
    inv_fac.append(1)
    inv_fac.append(1)
    for i in range(2, n):
        fac.append(fac[-1] * i % mmm)
        inv.append(mmm - inv[mmm%i] * (mmm // i) % mmm)
        inv_fac.append(inv_fac[-1] * inv[-1] % mmm)

def choice(a, b):
    if a <= b:
        return 0
    return fac[a] * (inv_fac[b] * inv_fac[a-b] % mmm) % mmm

init(hoge + 1)
print(choice(hoge, p) % mmm)

# nCk - TLE
# def choice(a, b):
#     if a == b or b == 0:
#         return 0
#     if a < b:
#         return choice(b, a)
#     bunshi = a
#     t = min(b, (a-b))
#     bunbo = t
#     for i in range(1, t):
#         bunshi *= (a-i) % mmm
#         bunbo *= (t-i) % mmm
#     return bunshi // bunbo


### FIXED CODE ###

x, y = list(map(int, input().split(' ')))
# K馬(右上のみ) -> パスカルの三角形っぽい
mmm = 1000000000 + 7
sss = x + y
if sss % 3 != 0:
    print(0)
    exit()
hoge = sss // 3
# 上にp, 右にq
# 2p + q = y
# 2q + p = x
# p + q = hoge
# p = y - hoge
# q = x - hoge
p =  y - hoge
q = x - hoge
#print(hoge, p, q)
if p < 0 or q < 0:  # 3 0 の時で Wrong Answer
    print(0)
    exit()

# 二項係数 mod [検索]
fac = []
inv = []
inv_fac = []
def init(n):
    fac.append(1)
    fac.append(1)
    inv.append(0)
    inv.append(1)
    inv_fac.append(1)
    inv_fac.append(1)
    for i in range(2, n):
        fac.append(fac[-1] * i % mmm)
        inv.append(mmm - inv[mmm%i] * (mmm // i) % mmm)
        inv_fac.append(inv_fac[-1] * inv[-1] % mmm)

def choice(a, b):
    if a < b:
        return 0
    return fac[a] * (inv_fac[b] * inv_fac[a-b] % mmm) % mmm

init(hoge * 2 + 1)
print(choice(hoge, p) % mmm)

# nCk - TLE でした
# def choice(a, b):
#     if a == b or b == 0:
#         return 0
#     if a < b:
#         return choice(b, a)
#     bunshi = a
#     t = min(b, (a-b))
#     bunbo = t
#     for i in range(1, t):
#         bunshi *= (a-i) % mmm
#         bunbo *= (t-i) % mmm
#     return bunshi // bunbo
from scipy.misc import comb

N = int(input())
num_list = list(map(int, input().split()))
num_set = set(num_list)
num_dict = {}

for i in num_set:
  if num_list.count(i) == 1:
    pass
  else:
    num_dict[i] = num_list.count(i)

# 全数あるときの組み合わせ
ans_dict_1 = {}
# 1個抜いたときの組み合わせ
ans_dict_2 = {}

for k, v in num_dict.items():
  ans_dict_1[k] = comb(v,2,exact=True)
  ans_dict_2[k] = comb(v-1,2,exact=True)

total = sum(ans_dict_1.values())

for i in num_list:
  print(total - ans_dict_1[i] + ans_dict_2[i])

### FIXED CODE ###

from scipy.misc import comb
from collections import Counter
import datetime

N = int(input())
num_list = list(map(int, input().split()))
# num_set = set(num_list)
num_dict = {}

num_counter = Counter(num_list)
  
# 全数あるときの組み合わせ
ans_dict_1 = {}
# 1個抜いたときの組み合わせ
ans_dict_2 = {}
rap_2 = datetime.datetime.now()
for k, v in num_counter.most_common():
  ans_dict_1[k] = comb(v,2,exact=True)
  ans_dict_2[k] = comb(v-1,2,exact=True)

total = sum(ans_dict_1.values())

for i in num_list:
  print(total - ans_dict_1[i] + ans_dict_2[i])
3 0
1000000000 1000000000 1000000000

### FIXED CODE ###

import sys
n,k=map(int,input().split())
h=list(map(int,input().split()))
h.sort()
if n<=k:
    print(0)
    sys.exit()
else:
    for i in range(k):
        h[-i-1]=0
ans=0
for i in h:
    ans+=i
print(ans)
n = int(input())
a = input()
b = input()
c = input()

t = n * 2;

for i in range(n):
    if a[i] == b[i] : t -= 1
    if b[i] == c[i] : t -= 1
    if c[i] == a[i] : t -= 1
    
    if a[i] == b[i] and b[i] == c[i] and c[i] == a[i] : t += 1
    
print(t)

### FIXED CODE ###

n , x , y = map(int , input().split())

min = x + y - n
if min < 0 : min = 0

if x < y : print (str(x) + " " + str(min))
else : print(str(y) + " " + str(min))
a = int(input())
list=list(map(int,input().split()))

b=list[0]//a
c=list[1]//a

if list[1]%a==0
	print("OK")

elif c-b>=1:
	print("OK")

else:
  print("NG")


### FIXED CODE ###

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

b=list[0]//a
c=list[1]//a

if list[0]%a==0:
	print("OK")

elif c-b>=1:
	print("OK")

else:
  print("NG")
# import
import numpy as np

# input
H, W = map(int, input().split())

Mtmp = []
for _ in range(H):
    tmp = list(input())
    Mtmp.append(tmp)

M = np.array(Mtmp)
S = np.array([[0]*W]*H)

#print(M)

digtmp = np.array([[0, 1], [1, 0], [0, -1], [-1, 0]])

def dfs(i, j):
    global ngflag
    global searchflag
    if S[i, j] == 1:
        return
    S[i, j] = 1
    if M[i, j] == '.':
        return
    #print("i:{}, j:{}".format(i, j))
    searchflag = 1
    dig = digtmp + np.array([i, j])
    for d in dig:
        if 0 <= d[0] < W and 0 <= d[1] < H:
            if M[d[0], d[1]] == '#':
                ngflag = 0
                dfs(d[0], d[1])

searchflag = 0

while True:
    ngflag = 1
    if 0 not in S:
        if M[target[0], target[1]] == '.':
            ngflag = 0
        break
    target = list(zip(*np.where(S == 0)))[0]
    #print("sf:{}, ng:{}".format(searchflag, ngflag))
    dfs(target[0], target[1])
    if M[target[0], target[1]] == '#' and searchflag == 1 and ngflag == 1:
        break
        

#print("sf:{}, ng:{}".format(searchflag, ngflag))

if searchflag == 1 and ngflag == 0:
    ans = 'Yes'
elif searchflag == 1 and ngflag == 1:
    ans = 'No'
else:
    ans = 'Yes'

print(ans)


### FIXED CODE ###


# import
import numpy as np
import sys
sys.setrecursionlimit(10**6)

# input
H, W = map(int, input().split())

Mtmp = []
for _ in range(H):
    tmp = list(input())
    Mtmp.append(tmp)

M = np.array(Mtmp)
S = np.array([[0]*W]*H)

#print(M)

digtmp = np.array([[0, 1], [1, 0], [0, -1], [-1, 0]])

def dfs(i, j):
    global ngflag
    global searchflag
    if S[i, j] == 1:
        return
    S[i, j] = 1
    if M[i, j] == '.':
        return
    #print("i:{}, j:{}".format(i, j))
    searchflag = 1
    dig = digtmp + np.array([i, j])
    for d in dig:
        if 0 <= d[0] < H and 0 <= d[1] < W:
            if M[d[0], d[1]] == '#':
                ngflag = 0
                dfs(d[0], d[1])

searchflag = 0
ngflag = 1

while True:
    if 0 not in S:
        if M[target[0], target[1]] == '.':
            ngflag = 0
        break
    target = list(zip(*np.where(S == 0)))[0]
    #print("sf:{}, ng:{}".format(searchflag, ngflag))
    if M[target[0], target[1]] == '#':
        ngflag = 1
    dfs(target[0], target[1])
    if M[target[0], target[1]] == '#' and searchflag == 1 and ngflag == 1:
        break


#print("sf:{}, ng:{}".format(searchflag, ngflag))

if searchflag == 1 and ngflag == 0:
    ans = 'Yes'
elif searchflag == 1 and ngflag == 1:
    ans = 'No'
else:
    ans = 'Yes'

print(ans)
from math import factorial as fc

n,k=map(int,input().split())

for i in range(1,k+1):
    b=fc(n-k+1)//fc(i)//fc(n-k+1-i)
    r=fc(k-1)//fc(i-1)//fc(k-1-(i-1))
    print(b*r%(10**9+7))


### FIXED CODE ###

from math import factorial as fc

MOD=10**9+7
n,k=map(int,input().split())

for i in range(1,k+1):
    if n-k+1<i:
        print(0)
        continue
    b=fc(n-k+1)//fc(i)//fc(n-k+1-i)
    r=fc(k-1)//fc(i-1)//fc(k-1-(i-1))
    print(b%MOD*r%MOD)
import numpy as np
N = int(input())

dp = np.zeros((N+1,4,4,4),dtype="int")

dp[0,3,3,3] = 1
mod = 10**9+7


for l in range(N):
    for c1 in range(4):
        for c2 in range(4):
            for c3 in range(4):
                if dp[l,c3,c2,c1] == 0:
                    continue
                for c0 in range(4):
                    if c0 == 1 and c1 == 2 and c2 == 0:
                        continue
                    if c0 == 2 and c1 == 1 and c2 == 0:
                        continue
                    if c0 == 2 and c1 == 0 and c2 == 1:
                        continue
                    if c0 == 2 and c1 == 1 and c3 == 0:
                        continue
                    if c0 == 2 and c2 == 1 and c3 == 0:
                        continue
                    dp[l+1,c2,c1,c0] += dp[l,c3,c2,c1]
                    dp[l + 1, c2, c1, c0] %= mod
                    
ans = 0
for c1 in range(4):
    for c2 in range(4):
        for c3 in range(4):
            ans += dp[N,c3,c2,c1]
            ans %= mod
print(ans%mod)

### FIXED CODE ###

import numpy as np
N = int(input())

dp = np.zeros((N+1,4,4,4),dtype="int")

dp[0,3,3,3] = 1
mod = 10**9+7


for l in range(N):
    for c1 in range(4):
        for c2 in range(4):
            for c3 in range(4):
                if dp[l,c3,c2,c1] == 0:
                    continue
                for c0 in range(4):
                    if c0 == 1 and c1 == 2 and c2 == 0:
                        continue
                    if c0 == 2 and c1 == 1 and c2 == 0:
                        continue
                    if c0 == 2 and c1 == 0 and c2 == 1:
                        continue
                    if c0 == 2 and c1 == 1 and c3 == 0:
                        continue
                    if c0 == 2 and c2 == 1 and c3 == 0:
                        continue
                    dp[l+1,c2,c1,c0] += dp[l,c3,c2,c1]
                    dp[l + 1, c2, c1, c0] %= mod
                    
ans = 0
for c1 in range(4):
    for c2 in range(4):
        for c3 in range(4):
            ans += dp[N,c3,c2,c1]
            ans %= mod
print(ans%mod)
a,b,k = map(int, input().split())
cnt = 0
for i in range(min(a,b),-1,0):
  if a%i == 0 and b%i == 0:
    cnt += 1
  if cnt>=k:
    print(i)
    exit()

### FIXED CODE ###

a,b,k = map(int, input().split())
mn = min(a,b)
cnt = 0
for i in range(mn, 0, -1):
    if a%i==0 and b%i==0:
        cnt += 1
    if cnt >= k:
        print(i)
        exit()
from subprocess import run
from os import path

if not path.exists("./tmp215378912379"):
  with open("./tmp215378912379.cpp", mode='w') as f:
    f.write("""
  #include <bits/stdc++.h>
  template <class T>
  concept Integral = std::is_integral_v<T>;

  int main() {
    auto f = []<Integral T>(T a, T b) { return a * b; };
    int a, b;
    std::cin >> a >> b;
    std::cout << f(a, b) << std::endl;
  }
  """)

  run("g++ -o ./tmp215378912379 -std=gnu++2a fconcepts ./tmp215378912379.cpp")

run("./tmp215378912379")

### FIXED CODE ###

from subprocess import run

with open("./tmp215378912379.cpp", mode='w') as f:
  f.write("""
#include <bits/stdc++.h>
template <class T>
concept Integral = std::is_integral_v<T>;

int main() {
  auto f = []<Integral T>(T a, T b) { return a * b; };
  int a, b;
  std::cin >> a >> b;
  std::cout << f(a, b) << std::endl;
}
""")

run("g++ -o ./tmp215378912379 -std=gnu++2a -fconcepts ./tmp215378912379.cpp && ./tmp215378912379", shell=True)
A, B, C, D = map(int, input().split())

def gcd(a, b):
    if (b==0):
        return a
    else:
        return gcd(b, a % b)

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

ans_c = (B - A) // C
ans_d = (B - A) // D
i = (B - A) // (C * D // gcd(C, D))

print(B - A - ans_c - ans_d + i)

### FIXED CODE ###

A, B, C, D = map(int, input().split())

def gcd(a, b):
    if (b==0):
        return a
    else:
        return gcd(b, a % b)

G = C * D // gcd(C, D)

ans_b = B - B//C - B//D + B//G
ans_a = A - 1 - (A-1)//C - (A-1)//D + (A-1)//G

print(ans_b - ans_a)
n=int(input())
dat = list(map(int, input().split()))

for e in dat:
    e = str(byte(e))

for e in dat:
    e = e.rfind('1')

print(min(dat)-1)



### FIXED CODE ###

import sys

def main():
    N = int(input())
    A = [int(_) for _ in input().split()]

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] //= 2
            else:
                print(t)
                sys.exit()
        t += 1

main()
f=input()
number=f.split(" ")
x=number[1]
y=number[2]
z=x+y/2
print(z)


### FIXED CODE ###

number=input().split(" ")
x=int(number[0])
y=int(number[1])
z=x+y/2
print(int(z))
class Graph():
	def __init__(self):
		self.adjacency_dict = {}
		self.weight = []

	def add_vartex(self, v):
		self.adjacency_dict[v] = []
		self.weight.append([])

	def add_edge(self, v1, v2, w):
		self.adjacency_dict[v1].append(v2)
		self.adjacency_dict[v2].append(v1)
		self.weight[v1].append(w)
		self.weight[v2].append(w)

	def get_vartexes(self):
		return self.adjacency_dict.keys()

    def get_edges(self, v):
        return self.adjacency_dict[v], self.weight[v]

    def printgraph(self):
    	return print(self.adjacency_dict)

n = int(input())

res = []
g = Graph()
for i in range(n):
	res.appned(-1)
	g.add_vartex(i)

for i in range(n-1):
	u, v, w = map(int, input().strip().split())
	g.add_edge(u - 1, v - 1, w % 2)


q = []
res[0] = 0
q.append(0)
while(len(q) > 0):
	v = q.pop()
	u_l, w_l = get_edges(v)
	for u, w = in zip(u_l, w_l):
		if res[u] != -1:
			continue
		res[u] = (res[v] + w) % 2
		q.appned(u)

for i in range(n):
	print(res[i])



### FIXED CODE ###

class Graph():
	def __init__(self):
		self.adjacency_dict = {}
		self.weight = []

	def add_vartex(self, v):
		self.adjacency_dict[v] = []
		self.weight.append([])

	def add_edge(self, v1, v2, w):
		self.adjacency_dict[v1].append(v2)
		self.adjacency_dict[v2].append(v1)
		self.weight[v1].append(w)
		self.weight[v2].append(w)

	def get_vartexes(self):
		return self.adjacency_dict.keys()

	def get_edges(self, v):
		return self.adjacency_dict[v], self.weight[v]

	def printgraph(self):
		return print(self.adjacency_dict)

n = int(input())

res = []
g = Graph()
for i in range(n):
	res.append(-1)
	g.add_vartex(i)

for i in range(n-1):
	u, v, w = map(int, input().strip().split())
	g.add_edge(u - 1, v - 1, w % 2)


q = []
res[0] = 0
q.append(0)
while(len(q) > 0):
	v = q.pop()
	u_l, w_l = g.get_edges(v)
	for u, w in zip(u_l, w_l):
		if res[u] != -1:
			continue
		res[u] = (res[v] + w) % 2
		q.append(u)

for i in range(n):
	print(res[i])
S = input()

s = S.replace('<>', '<,>').replace('><', '>,<').split(',')
lst1 = [ss.count('<') - ss.count('>') for ss in s]

ans = [0]

for i in lst:
    if i > 0:
        ans += list(range(1,i+1))
    else:
        ans[-1] = max(ans[-1], -i)
        ans += list(range(-i-1,-1, -1))

print(sum(ans))

### FIXED CODE ###

S = input()

lst = [1 if S[0]=='<' else -1]
for i in range(1, len(S)):
    if S[i] == S[i - 1]:
        if S[i]=='<':lst[-1] += 1
        else: lst[-1] -= 1
    else:
        if S[i]=='>':lst.append(-1)
        else: lst.append(1)
ans = [0]

for i in range(len(lst)):
    if lst[i] > 0:
        for j in range(0, lst[i] + 1):
            ans.append(j)
    else:
        ans[-1] = max(ans[-1], -lst[i])
        for j in range(0, -lst[i]):
            ans.append(-lst[i]-j-1)

print(sum(ans))
inp = raw_input()
list = inp.split()
x = int(list[0])
a = int(list[1])
b = int(list[2])
if abs(a-x)<abs(b-x):
  print('A')
else:
  print('B')

### FIXED CODE ###

inp = raw_input()#raw_input accept number and literary,input accept number only
list = inp.split()
x = int(list[0])
a = int(list[1])
b = int(list[2])
if abs(a-x)<abs(b-x):
  print('A')
else:
  print('B')