Harryxun/stf_run huggingface dataset:
def solve(X, Y):
	ans = []


	# append output array
    ans.append(str(X + Y // 2))

    # Output according to format
    ans = '\n'.join(ans)
    return ans

# receive inputs
X, Y = list(map(int, input().split()))

# print outputs
print(solve(X, Y))


### FIXED CODE ###

def solve(X, Y):
	ans = []
	
	ans.append(str(X + Y // 2))
	
    # Output according to format
	ans = '\n'.join(ans)
	return ans

# receive inputs
X, Y = list(map(int, input().split()))

# print outputs
print(solve(X, Y))
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
red = []
for _ in range(n):
    red.append(na())
blue = []
for _ in range(n):
    blue.append(na())

red_1 = sorted(red)
blue_1 = sorted(blue)
ans_1 = 0

for i in red_1:
    for j in blue_1:
        if i[0] < j[0] and i[1] < j[1]:
            ans_1 += 1
            blue_1.remove(j)
            break

red.sort()
blue.sort()
red_2 = sorted(red, key=lambda x:sum(x))
blue_2 = sorted(blue, key=lambda x:sum(x))
ans_2 = 0

for i in red_2:
    for j in blue_2:
        if i[0] < j[0] and i[1] < j[1]:
            ans_2 += 1
            blue_2.remove(j)
            break
red_3 = sorted(red, key=lambda x:x[1])
blue_3 = sorted(red, key=lambda x:x[1])
red_3 = sorted(red_3, key=lambda x:sum(x))
blue_3 = sorted(blue_3, key=lambda x:sum(x))
ans_4
for i in red_3:
    for j in blue_3:
        if i[0] < j[0] and i[1] < j[1]:
            ans_4 += 1
            blue_3.remove(j)
            break

from operator import itemgetter
red.sort(key=itemgetter(1))
blue.sort(key=itemgetter(1))
ans_3 = 0

for i in red:
    for j in blue:
        if i[0] < j[0] and i[1] < j[1]:
            ans_3 += 1
            blue.remove(j)
            break

ans = []
ans.append(ans_1)
ans.append(ans_2)
ans.append(ans_3)
ans.append(ans_4)
print(max(ans))


### FIXED CODE ###

import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
red = []
for _ in range(n):
    red.append(na())
blue = []
for _ in range(n):
    blue.append(na())

red.sort()
blue.sort()
ans = 0

tmp = []
for i in blue:
    for j in red:
        if i[0] > j[0] and i[1] > j[1]:
            tmp.append(j)
    if tmp != []:
        max_red = max(tmp, key=lambda x:x[1])
        ans += 1
        red.remove(max_red)
        tmp = []
    else:
        pass

print(ans)
k,x =map(int,input())
if x<=500*k:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

k,x=map(int,input().split())
if 500*k>=x:
    print("Yes")
else:
    print("No")
N, Q = map(int, input().split())


class Tree(object):
    def __init__(self, num):
        self.num = num
        self.childs = []
        self.count = 0


def dfs(p, x):
    """
    add x to all elements which have p as parent
    :param p: root of subtree, Tree class
    :param x: numbers to add, int
    """
    # add x to p.count
    p.count += x

    # recurrsive call for direct children of p
    for child in p.childs:
        dfs(child, x)


trees = [Tree(num) for num in range(N)]

for _ in range(N-1):
    a, b = map(int, input().split())
    a = a - 1
    b = b - 1
    trees[a].childs.append(trees[b])


for _ in range(Q):
    p, x = map(int, input().split())
    p = p - 1
    dfs(trees[p], x)


res = ""
for n, tree in enumerate(trees):
    if n != len(trees):
        res += str(tree.count) + " "
    else:
        res += str(tree.count)

print(res)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

 
N,Q = map(int,input().split())
AB = [[int(x) for x in input().split()] for _ in range(N-1)]
PX = [[int(x) for x in input().split()] for _ in range(Q)]
 
graph = [[] for _ in range(N+1)]
for a,b in AB:
    graph[a].append(b)
    graph[b].append(a)
 
value = [0] * (N+1)
for p,x in PX:
    value[p] += x
 
def dfs(v,parent,add):
    value[v] += add
    for x in graph[v]:
        if x == parent:
            continue
        dfs(x,v,value[v])
 
dfs(1,0,0)
 
answer = ' '.join(map(str,value[1:]))
print(answer)
input = sys.stdin.readline

def inp_str():
    '''
    一行の文字をlistで取得
    '''
    return list(input())[:-1]


s = inp_str()
t = inp_str()
n = len(s)
m = len(t)
value = [[0]*(m+1) for i in range(n+1)]
ans = [[""]*(m+1) for i in range(n+1)]

for i in range(n):
    for j in range(m):
        if s[i] == t[j]:
            value[i + 1][j + 1] = value[i][j] + 1
            ans[i + 1][j + 1] = "".join([ans[i][j], s[i]])
        elif value[i][j + 1] > value[i + 1][j]: #UP
            ans[i + 1][j + 1] = ans[i][j + 1]
            value[i + 1][j + 1] = value[i][j + 1]
        else:  # LEFT
            ans[i + 1][j + 1] = ans[i + 1][j]
            value[i + 1][j + 1] = value[i + 1][j]

print(ans[n][m])


### FIXED CODE ###

import sys
input = sys.stdin.readline

s = list(input())
t = list(input())
n = len(s)-1
m = len(t)-1
value = [[0]*(m+1) for i in range(n+1)]


for i in range(n):
    for j in range(m):
        if s[i] == t[j]:
            value[i + 1][j + 1] = value[i][j] + 1
        elif value[i][j + 1] > value[i + 1][j]: #UP
            value[i + 1][j + 1] = value[i][j + 1]
        else:  # LEFT
            value[i + 1][j + 1] = value[i + 1][j]
i = n-1
j = m-1
ans=""
while i >= 0 and j >= 0:
    if s[i] == t[j]:
        ans = s[i] + ans
        i -= 1
        j -= 1
    elif value[i][j + 1] > value[i + 1][j]:
        i -= 1
    else:
        j -= 1
print(ans)
n = int(input())
h = list(map(int, input().split()))

sa = []

for i in range(n-1):
    sa.append(h[i+1]-h[i])

#print(sa)

ans = 0
for i in range(n-1):
    if sa[i] == 0 and sa[i+1] < 0:
        print('No')
        exit(0)
    else:
        if sa[i] == -1:
            ans += 1
        elif sa[i] < -1:
            ans += sa[i]

    if ans > 1:
        print('No')
        exit(0)
        
#print(ans)
print('Yes')

### FIXED CODE ###

n=int(input())
h=list(map(int,input().split()))
f=True
m=0
for i in range(n):
    if h[i]>m:
        m=h[i]-1
    elif h[i]==m:
        continue
    else:
        f=False
        break
print('Yes' if f else 'No')
M,K=map(int,input().split())
x=list(range(K))+list(range(K+1,2**M))
print(*(x[::-1]+[K]+x+[K]) if K<2**M-1 else [-1])

### FIXED CODE ###

M,K=map(int,input().split())
x=list(range(2**M))
print(*x[::-1]+x if K==0 else x[:K:-1]+x[K-1::-1]+[K]+x[:K]+x[K+1:]+[K] if K<2**M and M>1 else[-1])
n,w = map(int,input().split())
wv=[]
for _ in range(n):
  w,v=map(int,input().split())
  wv.append([w,v])

dp=[[0 for i in range(w+1)]for j in range(n+1)]
for i in range(1,n+1):
  for j in range(1,w+1):
    if j-wv[i-1][0]<0:
      dp[i][j]=dp[i-1][j]
    else:
      dp[i][j]=max(dp[i-1][j-wv[i][0]],dp[i-1][j])

print(dp[n][w])

### FIXED CODE ###

n,w=map(int,input().split())
P=[]
for _ in range(n):
  iw,iv=map(int,input().split())
  P.append([iw,iv])
INF=float('inf')
 
dp=[[0 for i in range(w+1)] for j in range(n+1)]
 
for i in range(1,n+1):
  for j in range(1,w+1):
    if j-P[i-1][0]>=0:
      dp[i][j]=max(dp[i-1][j],dp[i-1][j-P[i-1][0]]+P[i-1][1])
    else:
      dp[i][j]=dp[i-1][j]
print(dp[n][w])
# -*- coding: utf-8 -*-


from sys import stdin
import itertools


############################################

# read data for n sequences.
temp = stdin.readline().split()
N = int(temp[0])
X = int(temp[1])

data = []
write = stdin.readline().split()
for i in range(N+1):
    data.append(int(write[i]))
    
count = 0
dis = 0

for d in data:
    if dis <= X:
        count += 1
        dis += d
    else:
        break

print(count)

### FIXED CODE ###

# -*- coding: utf-8 -*-


from sys import stdin
import itertools



############################################

# read data for n sequences.
temp = stdin.readline().split()
N = int(temp[0])
X = int(temp[1])

data = []
write = stdin.readline().split()
for i in range(N):
    data.append(int(write[i]))
    
count = 1
dis = 0

for d in data:
    dis += d
    if dis <= X:
        count += 1
    else:
        break

print(count)
n = int(input())
a = [int(i) for i in input().split()]
ans = 0

while True:
  if [i for i in a if i%2 == 1]:
    break
  a = [ i//2 for i in a]
  ans += 1
print(ans)

### FIXED CODE ###

s = input()
s1 = int(s[0])
s2 = int(s[1])
s3 = int(s[2])

print(s1 + s2+s3)
import sys

sys.setrecursionlimit(10**7)

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

x = ni()
for a in range(-250, 251):
    for b in range(-250, 251):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            exit(1)

### FIXED CODE ###

import sys

sys.setrecursionlimit(10**7)

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

x = ni()
for a in range(-120, 120):
    for b in range(-120, 120):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            exit(0)
n=int(input())
a=[[] for i in range(n)]
for i in range(n-1):
    u,v,w=map(int,input().split())
    a[u-1].append((v-1,w))
    a[v-1].append((u-1,w))
b=[None for i in range(n)]
def k(v,dis):
    b[v]=dis
    for next_v,w in a[v]:
        if b[next_v]!=None:
            continue
        if w%2==0:
            k(next_v,dis)
        else:
            k(next_v,1-dis)
k(0,0)
for i in range(n):
    print(b[i])

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
n=int(input())
a=[[] for i in range(n)]
for i in range(n-1):
    u,v,w=map(int,input().split())
    a[u-1].append((v-1,w))
    a[v-1].append((u-1,w))
b=[None for i in range(n)]
def k(v,dis):
    b[v]=dis
    for next_v,w in a[v]:
        if b[next_v]!=None:
            continue
        if w%2==0:
            k(next_v,dis)
        else:
            k(next_v,1-dis)
k(0,0)
for i in range(n):
    print(b[i])
S = input()
Q = int(input())
for _ in range(Q):
    q = list(map(str, input().split()))
    if q[0]=='1':
        list(S).reverse()
        S = ''.join(S)
    else:
        if q[1]=='1':
            S = q[2] + S
        else:
            S = S + q[2]

print(S)

### FIXED CODE ###

S = list(input())
if S[0]==S[1] and S[0]==S[2]:
    print('No')
else:
    print('Yes')
N,M=map(int,input().split())
alist=list(map(int,input().split()))
alist.sort(reverse=True)

while(M>0):
  alist[0]//=2
  if alist[0]<alist[1]:
    alist.sort(reverse=True)
  M-=1

print(sum(alist))


### FIXED CODE ###

#from heapq import heappush, heappop
import heapq

N,M=map(int,input().split())
alist=list(map(int,input().split()))

hq=[]
for a in alist:
  heapq.heappush(hq,-a)
  
while(M>0):
  target=-1*heapq.heappop(hq)
  target//=2
  heapq.heappush(hq,-target)
  M-=1

answer_list=[heapq.heappop(hq) for i in range(len(hq))]
#print(answer_list)
print(-sum(answer_list))
N = int(input())
A = list(map(int, input().split()))
ans = []
for i in range(N):
    cnt = 0
    while A[i] % 2 == 0:
        A[i] = A[i] / 2
        cnt = cnt + 1
    ans.append(cnt)
print(min(sns))

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
ans = []
for i in range(N):
    cnt = 0
    while A[i] % 2 == 0:
        A[i] = A[i] / 2
        cnt = cnt + 1
    ans.append(cnt)
print(min(ans))
x = 3 x ** 3

### FIXED CODE ###

x = int(input())
print(x ** 3)
import sys

n = int(input())
a = map(int, sys.stdin.read().split("\n"))

d = dict()
for a_i in a:
	if a_i not in d:
		d[a_i] = 0
	d[a_i] = (d[a_i]+1) % 2

print(sum(d.values))

### FIXED CODE ###

import sys

n = int(input())
# a = map(int, sys.stdin.read().split("\n"))
a = map(int, [input() for i in range(n)])

d = dict()
for a_i in a:
	if a_i not in d:
		d[a_i] = 0
	d[a_i] = (d[a_i]+1) % 2

print(sum(d.values()))
a,b,k=map(int,input().split())
if k<=a:
	A=a-k
	B=b
elif k>=a and k<=b:
	A=0
	B=b+a-k
else:A=B=0
print(A,B)


### FIXED CODE ###

S,T =input().split()
print(T+S)
s=str(input())
b=''
c=0
d=int(round(len(s)/2))
if len(s) == 1:
    print(0)
elif s[0]=='0':
    for i in range(d):
        b+="01"
else:
    for i in range(d):
        b+="10"
if len(s) != len(b):
    b = b[:-1]
    print(b)
for u in range(len(s)):
    if s[u] != b[u]:
        c+=1
print(c)

### FIXED CODE ###

import math
s=str(input())
b=''
c=0
d=math.ceil(len(s)/2)
if s[0]=='0':
    for i in range(d):
        b+="01"
else:
    for i in range(d):
        b+="10"
if len(s) != len(b):
    b = b[:-1]
for u in range(len(s)):
    if s[u] != b[u]:
        c+=1
print(c)
import math

N,A,B,C = map(int,input().split())
target = [A,B,C]
l = []
#ans = math.inf

for _ in range(N):
    l.append(int(input()))


def calc2(v):
    res = 0
    for i in range(3):
        if len(v[i])==0:
            return math.inf
        res += 10*(len(v[i])-1) + abs(sum(v[i]) - target[i])
    return res

v=[[],[],[],[]]
def dfs2(depth=0):
    #global ans
    if depth == N:
        return calc2(v)
    #else:
    ans = math.inf
    for i in range(4):
        #next_v = v.copy()
        #print(i, v, depth, l)
        v[i].append(l[depth])
        ans = min(ans,dfs2(depth+1))
        del v[i][-1]

    return ans
print(dfs2())

### FIXED CODE ###

import numpy as np

N,A,B,C = map(int,input().split())
target = [A,B,C]
l = []
#ans = math.inf

for _ in range(N):
    l.append(int(input()))


def calc2(v):
    res = 0
    for i in range(3):
        if len(v[i])==0:
            return np.inf
        res += 10*(len(v[i])-1) + abs(sum(v[i]) - target[i])
    return res

v=[[],[],[],[]]
def dfs2(depth=0):
    #global ans
    if depth == N:
        return calc2(v)
    #else:
    ans = np.inf
    for i in range(4):
        #next_v = v.copy()
        #print(i, v, depth, l)
        v[i].append(l[depth])
        ans = min(ans,dfs2(depth+1))
        del v[i][-1]

    return ans

print(dfs2())
n = int(input())
b = [int(i) for i in input().split()]
a = [b[0]]
for i in range(n-2):
    c = min(b[i], b[i+1])
    a.append(c)
    
a.append(max(b[-2],b[-1]))
print(sum(a))

### FIXED CODE ###

n = int(input())
b = [int(i) for i in input().split()]
a = [b[0]]
for i in range(n-2):
    c = min(b[i], b[i+1])
    a.append(c)
    
try:
    if b[-2]<=b[-1]:
        a.append(max(b[-2],b[-1]))
    else:
        a.append(min(b[-2],b[-1]))
except:
    a.append(b[0])
print(sum(a))
N,M = [int(i) for i in input().split()]
a = []
for i in range(N):
	array = input()
	a.append(array)
b = []
for i in range(M):
	line = input()
	b.append(line)
for i in range(N-M):
	for j in range(N-M):
		ans = 'Yes'
		for n in range(M):
			for m in range(M):
				if a[i+n][j+m] == b[n][m]:
					pass
					print(i,j,n,m)
				else:
					ans = 'No'
print(ans)

### FIXED CODE ###

n,m = [int(i) for i in input().split()]
a = []
for i in range(n):
	array = input()
	a.append(array)
b = []
for i in range(m):
	line = input()
	b.append(line)
ans = 'No'
for i in range (n-m+1):
	for j in range(n-m+1):
		Ans = ans
		if a[i][j:j+m] == b[0]:
			#print(i,j)
			for k in range(m):
				if not a[i+k][j:j+m] == b[k]:
					ans = Ans
					break
				else:
					ans = 'Yes'
					#print(ans)
print(ans)
s=raw_input()

data = s.split('/')
out = '2018/01/'+data[2]

print(out)

### FIXED CODE ###

s=input()

data = s.split('/')
out = '2018/01/'+data[2]

print(out)
s = input()
if s == "AAA" or s === "BBB":
    print("no")
else:
    print("yes")
    

### FIXED CODE ###

s = input()
if s == "AAA" or s == "BBB":
    print("No")
else:
    print("Yes")
a, b, c, x = [int(input()) for _ in range(4)]
cnt = 0
for ai in range(a):
	for bi in range(b):
		for ci in range(c):
        	if 500*ai + 100*bi + 50*ci == x:
            	cnt += 1
print(cnt)

### FIXED CODE ###

a, b, c, x = [int(input()) for _ in range(4)]
cnt = 0
for ai in range(0, a+1):
    for bi in range(0, b+1):
        for ci in range(0, c+1):
            if 500*ai + 100*bi + 50*ci == x:
                cnt += 1
print(cnt)
k = int(input())
s = str(input())

mod = 1000000007
decided_keta = len(s)
all_keta = len(s) + k

kai_list = [1 for i in range(1000010)]
for i in range(2,len(kai_list)):
    kai_list[i] = (kai_list[i-1]*i)%mod

answer = 0
for last_given_character_posi in range(decided_keta-1,all_keta):
    given_posi_pattern = kai_list[last_given_character_posi]*pow(kai_list[decided_keta-1],mod-2,mod)*pow(kai_list[last_given_character_posi-decided_keta+1],mod-2,mod)%mod
    char_pattern = pow(25,last_given_character_posi-(decided_keta-1),mod)
    rest_char_pattern = pow(26,all_keta-(last_given_character_posi+1),mod)
    answer = (answer + given_posi_pattern*char_pattern*rest_char_pattern)%mod
print(answer)

### FIXED CODE ###

k = int(input())
s = str(input())

mod = 1000000007
decided_keta = len(s)
all_keta = len(s) + k

kai_list = [1 for i in range(2000010)]
for i in range(2,len(kai_list)):
    kai_list[i] = (kai_list[i-1]*i)%mod

answer = 0
for last_given_character_posi in range(decided_keta-1,all_keta):
    given_posi_pattern = kai_list[last_given_character_posi]*pow(kai_list[decided_keta-1],mod-2,mod)%mod*pow(kai_list[last_given_character_posi-decided_keta+1],mod-2,mod)%mod
    char_pattern = pow(25,last_given_character_posi-(decided_keta-1),mod)
    rest_char_pattern = pow(26,all_keta-(last_given_character_posi+1),mod)
    answer = (answer + given_posi_pattern*char_pattern%mod*rest_char_pattern%mod)%mod
print(answer)
def LI(): return [int(x) for x in input().split()]
def TI(): return tuple(LI())
def II(): return int(input())

N,M=LI()

MP={}
for _ in range(M):
    fr, to = TI()
    if not fr in MP:
        MP[fr] = []
    MP[fr].append(to)

RESL=[-1]*(N+1)
def dfs(n):
    if RESL[n] != -1:
        return RESL[n]
    else:
        res = 0
        if n in MP:
            for to in MP[n]:
                res = max(res, dfs(to))
            res += 1
        RESL[n] = res
        return res
for i in range(1, N+1): dfs(i)
# print(RESL)
print(max(RESL))


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)

def LI(): return [int(x) for x in input().split()]
def TI(): return tuple(LI())
def II(): return int(input())

N,M=LI()

MP={}
for _ in range(M):
    fr, to = TI()
    if not fr in MP:
        MP[fr] = []
    MP[fr].append(to)

RESL=[-1]*(N+1)
def dfs(n):
    if RESL[n] != -1:
        return RESL[n]
    else:
        res = 0
        if n in MP:
            for to in MP[n]:
                res = max(res, dfs(to))
            res += 1
        RESL[n] = res
        return res
for i in range(1, N+1): dfs(i)
# print(RESL)
print(max(RESL))
s=input()
n=len(s)
if(s.count('C')==1):
    x=s.index('C')
c=0
for i in s:
    if(i.islower()):
        c+=1
if(s[0]=='A' and (x>=2 and x<=n-2) and c==n-2):
    print('AC')
else:
    print("WA")


### FIXED CODE ###

s = input()
if s[0] == 'A' and s[2:-1].count('C') == 1:
    for i in range(1,len(s)):
        if s[i].islower() == True:
            continue
        else:
            if s[i] == 'C':
                continue
            else:
                print('WA')
                exit()
else:
    print('WA')
    exit()
print('AC')
n=int(input())
d=list(map(int,input().split()))
dd=sorted(d)
N=dd[n-1]
sum1=0
sum2=0
count=0
for k in range(N+1):
    for i in range(n):
        if d[i]>=k:
            sum1+=1
    if sum1==n-sum1:
        count+=1
    sum1=0
    sum2=0
print(count)

### FIXED CODE ###

S=input()
sum=[0,0,0,0]
for t in range(4):
    for i in range(4):
        if S[int(t)]==S[int(i)]:
            sum[int(i)]+=1
if sum[0] == 2 and sum[1] == 2 and sum[2] == 2 and sum[3] == 2:
    print('Yes')
else:
    print('No')
import fractions
from functools import reduce

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

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

#in
n=int(input())
v=list(map(int, input().split()))

maxi = 0

# おなじか？
if len(list(set(v))) == 1:
    maxi = (v[0])
elif len(v) == 2:
    maxi = (max(v))
# 書き換え 1
else:
    for i in range(n):
        listv = v
        listv[i] = min(v) 
        listv[i] = max(listv)
        print(listv)
        print(v)
        listval = listv
        temp = gcd_list(listval)
        if temp> maxi:
            if temp != max(listv)
                maxi = temp
#最大公約数


print(maxi)

# 書き換え 2


### FIXED CODE ###

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

print((t//a)*b)
from collections import defaultdict
import sys
import math
from datetime import datetime
import re
import math
def sol(n, S, T):
    ans = ""
    for i in range(n):
        ans += S[i]
        ans += T[i]
    return ans





do_submit = True
#do_submit = False

def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    # n = int(parsed_lines[0][0])
    # k = int(parsed_lines[0][1])
    S = parsed_lines[0][0]
    return S


if not do_submit:
    S = input_parse("""
    1905
    """)
    print(sol(S))

    S = input_parse("""
    0112
    """)
    print(sol(S))

    S = input_parse("""
    1700
    """)
    print(sol(S))

    S = input_parse("""
    0000
    """)
    print(sol(S))

    S = input_parse("""
    1001
    """)
    print(sol(S))



else:
    #A, B = list(map(int, input().split()))
    n = int(input())
    S = input()
    T = input()
    print(sol(n, S, T))

    # S = input().strip()
    # print(sol(S))

### FIXED CODE ###

from collections import defaultdict
import sys
import math
from datetime import datetime
import re
import math
def sol(n, S, T):
    ans = ""
    for i in range(n):
        ans += S[i]
        ans += T[i]
    return ans





do_submit = True
#do_submit = False

def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    # n = int(parsed_lines[0][0])
    # k = int(parsed_lines[0][1])
    S = parsed_lines[0][0]
    return S


if not do_submit:
    S = input_parse("""
    1905
    """)
    print(sol(S))

    S = input_parse("""
    0112
    """)
    print(sol(S))

    S = input_parse("""
    1700
    """)
    print(sol(S))

    S = input_parse("""
    0000
    """)
    print(sol(S))

    S = input_parse("""
    1001
    """)
    print(sol(S))



else:
    #A, B = list(map(int, input().split()))
    n = int(input())
    S, T = list(map(str, input().split()))
    # S = input()
    # T = input()
    print(sol(n, S, T))

    # S = input().strip()
    # print(sol(S))
import math
X = int(input())
n = math.ceil(X**0.5)
lst = []
for i in range(2, n):
  a = 2
  while i**a <= X:
    lst.append(i**a)
    a += 1
lst.sort()
print(lst[-1])

### FIXED CODE ###

import math
X = int(input())
n = math.ceil(X**0.5+1)
lst = []
if X == 1 or X == 2 or X == 3:
  print(1)
  exit()
for i in range(2, n):
  a = 2
  while i**a <= X:
    lst.append(i**a)
    a += 1
lst.sort()
print(lst[-1])
H, W = map(int, input().split())
M = (H + W) * 80

A = [tuple(map(int, input().split())) for _ in range(H)]
B = [tuple(map(int, input().split())) for _ in range(H)]

dp = [[0] * W for _ in range(H)]
dp[0][0] |= (1 << (M - abs(A[0][0] - B[0][0])))

for h in range(H):
    for w, (a, b) in enumerate(zip(A[h], B[h])):
        d = abs(a - b)
        if d == 0:
            continue
        mask = 0
        if h > 0:
            mask |= (dp[h - 1][w] << d)
            mask |= (dp[h - 1][w] >> d)
        if w > 0:
            mask |= (dp[h][w - 1] << d)
            mask |= (dp[h][w - 1] >> d)
        dp[h][w] |= mask

state = dp[-1][-1]
nums = []
for digit, b in enumerate(bin(state)[2:][:: -1]):
    if b == '1':
        nums.append(M - digit)
ans = min(abs(n) for n in nums)
print(ans)


### FIXED CODE ###

H, W = map(int, input().split())
M = (H + W) * 80

A = [tuple(map(int, input().split())) for _ in range(H)]
B = [tuple(map(int, input().split())) for _ in range(H)]

dp = [[0] * W for _ in range(H)]
dp[0][0] = (1 << (M - abs(A[0][0] - B[0][0])))

for h in range(H):
    for w, (a, b) in enumerate(zip(A[h], B[h])):
        d = abs(a - b)
        mask = 0
        if h > 0:
            mask |= (dp[h - 1][w] << d)
            mask |= (dp[h - 1][w] >> d)
        if w > 0:
            mask |= (dp[h][w - 1] << d)
            mask |= (dp[h][w - 1] >> d)
        dp[h][w] |= mask

state = dp[-1][-1]
nums = []
for digit, b in enumerate(bin(state)[2:][:: -1]):
    if b == '1':
        nums.append(digit - M)
ans = min(abs(n) for n in nums)
print(ans)