Harryxun/stf_run huggingface dataset:
import sys
sys.setrecursionlimit(200000000)

N = int(input())
NUMS = [int(input()) for _ in range(N)]
NUMS = list(set(NUMS))

def gcd(num1, num2):
    if num2 == 0:
        return num1
    elif num1 == 0:
        return 1
    else:
        return gcd(num2, num1 % num2)


res = NUMS[0]
for num in NUMS[1:]:
    res = res * num / gcd(res, num)

print(int(res))

### FIXED CODE ###

import sys
import fractions
sys.setrecursionlimit(200000000)

N = int(input())
NUMS = [int(input()) for _ in range(N)]
NUMS = list(set(NUMS))

def gcd(num1, num2):
    if num2 == 0:
        return num1
    else:
        return gcd(num2, num1 % num2)


res = NUMS[0]
for num in NUMS[1:]:
    res = res * num // fractions.gcd(res, num)

print(int(res))
X,K,D=list(map(int,input().split()))

def sgn(x):
    if x>0:
        return 1
    elif x<0:
        return -1
    return 0

def solve():
    if X>0:
        x_greedy=X-K*D
    elif X<0:
        x_greedy=X+K*D

    if sgn(X)==sgn(x_greedy):
        return print(abs(x_greedy))

    else:
        x_r=X%D
        x_l=x_r-D

        r_parity=(abs(X-x_r)//D)%2
        if K%2==r_parity:
            return print(abs(x_r))
        else:
            return print(abs(x_l))

if __name__=='__main__':
    solve()

### FIXED CODE ###

S=input()
set_S=set(S)
if len(set_S)==1:
    ret=S.count('R')
else:
    if S[0]==S[1]=='R' or S[1]==S[2]=='R':
        ret=2
    else:
        ret=1
print(ret)
K=int(input())
A,B=map(int,input().split())
for i in range(A,B):
  if(i%K==0):
    print("ok")
  if(i==B and i%K!=0)
    print("NG")
  
 


### FIXED CODE ###

K = int(input())
A, B = map(int, input().split())
mul = 0
for i in range(A, B + 1):
    if i % K == 0:
        mul += 1
print("OK" if mul > 0 else "NG")
N = int(input())
A = list(map(int,input().split()))
A.sort()
judge = 0
side = []
while judge != 2 and len(A) > 1:
	MAX_A = A[len(A) -1]
	if MAX_A == A[len(A) - 2]:
		side.append(MAX_A)
		judge += 1
		del A[len(A) - 1]
		del A[len(A) - 2]
	else:
		del A[len(A) -1]

print(side[0] * side[1])
		
	

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
A.sort()
judge = 0
side = []
while judge != 2 and len(A) > 1:
	MAX_A = A[len(A) -1]
	if MAX_A == A[len(A) - 2]:
		side.append(MAX_A)
		judge += 1
		del A[len(A) - 2]
		del A[len(A) - 1]
	else:
		del A[len(A) -1]

if judge == 2:
	print(side[0] * side[1])
else:
	print(0)
# -*- coding: utf-8 -*-

import sys

outList = []
for line in sys.stdin.readlines():
    List = map(int, line.strip().split())

    [a, b] = List

    # LCM
    LCM = 1
    for i in xrange(2, max(a, b)):
        if isprime(i): continue
        if isprime(a) or isprime(b): break
        while(a % i == 0 and b % i == 0):
            LCM *= i
            a /= i
            b /= i

    # GCD
    GCD = List[0] * b

    print LCM, GCD

def isprime(n):
    for i in xrange(2, int(n ** 0.5)+1 ):
        if n % i == 0: return False
    return True

### FIXED CODE ###

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

import sys

def isprime(n):
    for i in xrange(2, int(n ** 0.5)+1 ):
        if n % i == 0: return False
    return True


outList = []
for line in sys.stdin.readlines():
    List = map(int, line.strip().split())

    [a, b] = List

    # LCM
    LCM = 1
    i = 1
    while( i <= min(a, b) ):
        i += 1
        if not isprime(i): continue
        while(a % i == 0 and b % i == 0):
            LCM *= i
            a /= i
            b /= i

    # GCD
    GCD = List[0] * b

    print LCM, GCD
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
ca = Counter(A)
ca = sorted(ca.items(), key=lambda x:-x[0])
cnt = 0
m = []
for k, v in ca:
  if v >= 2:
    cnt += 1
    m += [k]
  if cnt >= 2:
    break

print(m[0]*m[1])


### FIXED CODE ###

from collections import defaultdict
n = int(input())
a = list(map(int, input().split()))
d = defaultdict(int)
for i in a:
  d[i] += 1
l = [0, 0]
for k, v in d.items():
  if v >= 4 and k >= max(l):
    l = [k, k]
  elif v >= 2 and k >= min(l):
    l = sorted(l)
    l[0] = k
print(l[0]*l[1])
import copy

def gcd(x, y):
  if y == 0:
    return x
  else:
    return gcd(y, x % y)

def cal(array):
  while(len(array) > 1):
    a = array.pop(0)
    b = array.pop(0)
    array.append(gcd(a, b))
  return array[0]

n = input()
a = input().split()
a = map(lambda x: int(x), a)

answer_list = []

for i in range(int(n)):
  copy_a = copy.copy(a)
  copy_pop_a = copy_a.pop(i)
  answer_list.append(cal(copy_a))

answer = max(answer_list)

print(answer)


### FIXED CODE ###

import copy
import heapq
import fractions

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

gcd_l = [0]
gcd_r = [0]

for i in range(N):
  gcd_l.append(fractions.gcd(gcd_l[i], A[i]))
  gcd_r.append(fractions.gcd(gcd_r[i], A[-(i+1)]))

gcd_r = gcd_r[::-1]
ans = []

for i in range(N):
  ans.append(fractions.gcd(gcd_l[i], gcd_r[i+1]))

print(max(ans))
N=int(input())
A = [int(a) for a in input().split()]

d = {}
for a in A:
  d[a] = d.get(a,0) + 1
B = []
for k in d:
  if d[k] >= 4:
    B.append(k)
    B.append(k)
  elif d[k] >=2:
    B.append(k)
B.sort()
print(B[-1]*B[-2])

### FIXED CODE ###

N=int(input())
A = [int(a) for a in input().split()]

d = {}
for a in A:
  d[a] = d.get(a,0) + 1
B = [0,0]
for k in d:
  if d[k] >= 4:
    B.append(k)
    B.append(k)
  elif d[k] >=2:
    B.append(k)
B.sort()
print(B[-1]*B[-2])
def main(n,a,b):
    if 1 <= n <= 20 and 1 <= a <= 50 and 1 <= b <= 50 :
        sum_list = [(n-x)*b + x * a for x in range(1,n)]
    return min(sum_list)

if __name__ == '__main__':
    s = list(map(int, input().split()))
    huga = main(s[0],s[1],s[2])
    print(huga)

### FIXED CODE ###

def main(n,a,b):
    if (1 <= n <= 20 )and (1 <= a <= 50) and (1 <= b <= 50) :
        sum_list = [n * a, b] 
    return min(sum_list)

if __name__ == '__main__':
    s = list(map(int, input().split()))
    huga = main(s[0],s[1],s[2])
    print(huga)
N = int(input())
xlist = []
ylist = []
pqlist = []
pqcount = {}
for i in range(N):
  x, y = map(int, input().split(" "))
  xlist.append(x)
  ylist.append(y)

for i in range(N-1):
  for j in range(i+1, N):
    p = xlist[i] - xlist[j]
    q = ylist[i] - ylist[j]
    tuple_pq = (p, q,)
    if not (tuple_pq in pqlist):
      pqlist.append(tuple_pq)
      pqcount[tuple_pq] = 1
    else:
      pqcount[tuple_pq] += 1

print(N - max(pqcount.values()))

### FIXED CODE ###

N = int(input())
xlist = []
ylist = []
pqlist = []
pqcount = {}
for i in range(N):
  x, y = map(int, input().split(" "))
  xlist.append(x)
  ylist.append(y)

for i in range(N):
  for j in range(i+1, N):
    p = xlist[i] - xlist[j]
    q = ylist[i] - ylist[j]
    tuple_pq = (p, q,)
    if (-p, -q,) in pqlist:
      tuple_pq = (-p, -q)
    if not (tuple_pq in pqlist):
      pqlist.append(tuple_pq)
      pqcount[tuple_pq] = 1
    else:
      pqcount[tuple_pq] += 1

if N == 1:
  print(1)
else:
  print(N - max(pqcount.values()))
n, l = map(int, input().split())

# 味リストはL, L+1, L+2...
tastes = []
for i in range(n):
    tastes += [l+i]

# 味0があったらそれを食えばいい
if 0 in tastes:
    print(sum(tastes))
else:
    # 差が最小なのを食えばいい
    tastes.sort(key=abs)
    print(sum(tastes[1:]))

### FIXED CODE ###

S = input()
before = ''
for x in S:
    if before == x:
        print('Bad')
        exit()
    before = x

print('Good')
N, P = map(int, input().split())

if N == 1:
  d = P
else:
  d = 1
  i = 2
  while i**N <= P:
    if P % i**N == 0:
      P //= i**N
      d *= i
    else:
      i += 1
print(d)

### FIXED CODE ###

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

if N == 1:
  d = P
else:
  d = 1
  i = 2
  while i <= round(pow(P, 1/N)):
    if P % i**N == 0:
      P //= i**N
      d *= i
    else:
      i += 1
print(d)
n,m = map(int,raw_input().strip().split(' '))
graph = [[] for i in range(n)]
for i in range(m):
 s,t = map(int,raw_input().strip().split(' '))
 graph[s].append(t)
 graph[t].append(s)
color = {}
c = 0
for i in range(n):
 if not i in color:
  que = [i]
  color[i] = c
   if len(que) > 0:
    u = que[0]
    for v in graph[u]:
     if not v in color:
      color[v] = c
      que.append(v)
     del que[0]
   c += 1
q = int(raw_input())
for i in range(q):
    s,t = map(int,raw_input().strip().split(' '))
    if color[s] == color[t]:
        print 'yes'
    else:
        print 'no'

### FIXED CODE ###

n,m = map(int,raw_input().strip().split(' '))
graph = [[] for i in range(n)]
for i in range(m):
    s,t = map(int,raw_input().strip().split(' '))
    graph[s].append(t)
    graph[t].append(s)
color = {}
c = 0
for i in range(n):
    if not i in color:
        que = [i]
        color[i] = c
        while len(que) > 0:
            u = que[0]
            for v in graph[u]:
                if not v in color:
                    color[v] = c
                    que.append(v)
            del que[0]
        c += 1
q = int(raw_input())
for i in range(q):
   s,t = map(int,raw_input().strip().split(' '))
   if color[s] == color[t]:
     print 'yes'
   else:
     print 'no'
a = set()
i = 1
n = int(input())
def checkNum():
    global a, i, x
    x = i
    if x%3 ==0:
        a.add(i)
        endCheck()
    include3()
    x //= 10;
    if x:
        include3()
    endCheck()

def include3():
    global a, i
    if x%10 == 3:
        a.add(i)
        endCheck()
        
def endCheck():
    global i
    if i+1 <= n:
        i += 1
        checkNum()
    
        
checkNum()

print('',*a)



### FIXED CODE ###

n = int(input())
for i in range(1, n+1):
    if i%3 == 0 or  str(i).find('3') != -1:
        print(f" {i}", end = '')
print()
N,A,B=map(int, input().split())

s=N//(A+B)
NA=N-s*(A+B)
if(A!=0):
  if(NA//A>=1):
    sA=1
  else:
    sA=NA
else:
  sA=0
print(s*A+sA*A)

### FIXED CODE ###

S=input()
Sset=set(S)
if(len(Sset)==2):
  print('Yes')
else:
  print('No')
import numpy as np
S=input()
a_list = "abcdefghijklmnopqrstuvwxyz"
c_list = np.zeros(26)

for i in range(len(S)):
  c_list[a_list.index(S[i])] = c_list[a_list.index(S[i])] + 1

if not 0 in c_list: print('None')
else:
  print(a_list[c_list.index(0)])

### FIXED CODE ###

import numpy as np
S=input()
a_list = "abcdefghijklmnopqrstuvwxyz"
c_list = np.zeros(26)

for i in range(len(S)):
  c_list[a_list.index(S[i])] = c_list[a_list.index(S[i])] + 1

if not 0 in c_list: print('None')
else:
  c_list = c_list.tolist()
  print(a_list[c_list.index(0)])
import numpy as np

N=int(input())

counter=0
for i in range(1, N+1):
  if int(np.log10(i))%2==0:
    counter+=1
    
print(counter)

### FIXED CODE ###

N=int(input())

counter=0
for i in range(1, N+1):
  if len(str(i))%2==1:
    counter+=1
    
print(counter)
def step_memo(H):
    N = len(H)
    memo = [0]*N
    n = N-1
    def step(n):
        if n == 0:
            return 0
        elif n == 1:
            memo[1] = abs(H[1]-H[0])
            return memo[1]
        elif memo[n] != 0:
            return memo[n]
        else:
            memo[n]= min(step(n-2)+abs(H[n-2]-H[n]), step(n-1)+abs(H[n-1]-H[n]))
            return memo[n]
    return step(n)

N = int(input())
H = list(map(int, input().split()))
print(step_memo(H))

### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
points = [0]*N
points[1] = abs(H[1]-H[0])
for i in range(2,N):
    points[i] = min(points[i-2]+abs(H[i-2]-H[i]), points[i-1]+abs(H[i-1]-H[i]))
print(points[-1])
N=int(input())
c5=0
c2=0
if N%2==0:
  print(0)
else:
  Nlis=[2i for i in range(1,int(N/2)+1)]
  while(Nlis!=[0 for i in range(N)]):
    for i in range(N):
      if Nlis[i]%2==0:
        c2+=1
        Nlis[i]=Nlis[i]//2
      else:
        Nlis[i]=0
  Nlis=[2i for i in range(1,int(N/2)+1)]
  while(Nlis!=[0 for i in range(N)]):
    for i in range(N):
      if Nlis[i]%5==0:
        c5+=1
        Nlis[i]=Nlis[i]//5
      else:
        Nlis[i]=0


### FIXED CODE ###

N=int(input())
def fact(N,k):
  t=0
  c=0
  while(k**t<N):
    t=t+1
  for i in range(1,t+1):
    c+=N//(k**i)
  return c
if N%2!=0:
  print(0)
else:
  c2=fact(N//2,2)
  c5=fact(N//2,5)
  print(min(c2,c5))
#h,w,k=map(int, input().split())
#s=[list(input()) for i in range(h)]
p=[[-1]*w for i in range(h)]
for i in range(h):
    for j in range(w):
        if s[i][j]=='S':
            sta=(i,j)
np=[(1,0),(-1,0),(0,1),(0,-1)]
q={sta}
p[sta[0]][sta[1]]=0
step=0
while step<k and q:
    step+=1
    now=q.pop()
    for i,j in np:
        nx,ny=now[0]+i,now[1]+j
        if nx<0 or nx==h or ny<0 or ny==w:continue
        if s[nx][ny]=='.' and p[nx][ny]==-1:
            p[nx][ny]=step
            q.add((nx,ny))
ans=10**9
for i in range(h):
    for j in range(w):
        if p[i][j]>=0:
            ans=min(ans,i,j,h-i,w-j)
print(-(-ans//k)+1)

### FIXED CODE ###

h,w,k=map(int, input().split())
s=[list(input()) for i in range(h)]
p=[[-1]*w for i in range(h)]
for i in range(h):
    for j in range(w):
        if s[i][j]=='S':
            sta=(i,j)
np=[(1,0),(-1,0),(0,1),(0,-1)]
q={sta}
p[sta[0]][sta[1]]=0
step=0
while step<k and q:
    step+=1
    nq=set()
    while q:
        now=q.pop()
        for i,j in np:
            nx,ny=now[0]+i,now[1]+j
            if nx<0 or nx==h or ny<0 or ny==w:continue
            if s[nx][ny]=='.' and p[nx][ny]==-1:
                p[nx][ny]=step
                nq.add((nx,ny))
    q=nq.copy()

ans=10**9
for i in range(h):
    for j in range(w):
        if p[i][j]>=0:
            an=min(i,j,h-i-1,w-j-1)
            if ans>an:ans=an
print(-(-ans//k)+1)
# -*- coding:utf-8 -*-
import sys

first = 0
second = 0
third = 0
i = 0

for i in range(1,10):
    line = sys.argv[i]
    if first < int(line):
        third = second
        second = first
        first = int(line)
    elif second < int(line):
        third = second
        second = int(line)
    elif third < int(line):
        third = int(line)

print(first)
print(second)
print(third)

### FIXED CODE ###

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

first = 0
second = 0
third = 0
i = 0

for i in range(0,10):
    line = int(input())
    
    if first < int(line):
        third = second
        second = first
        first = int(line)
    elif second < int(line):
        third = second
        second = int(line)
    elif third < int(line):
        third = int(line)
print(first)
print(second)
print(third)
for i in range(1:10):
    print(str(i)+"x"+str(i)+"="+str(i*i))

### FIXED CODE ###

for i in range(1, 10):
    for j in range(1, 10):
        print(str(i)+"x"+str(j)+"="+str(i*j))
n,X = map(int,input().split())
x = list(map(int,input().split()))
x.append(X)
x.sort()
a=[]
for i in range(n-1):
        a.append(x[i+1]-x[i])        

def gcd(m,n):
        while n!=0:
                m,n = n,m%n
        return m

ans=min(a)
for j in a:
        if j%min(a) != 0:
                ans = gcd(j,ans)
print(ans)

### FIXED CODE ###

n,X = map(int,input().split())
x = list(map(int,input().split()))
x.append(X)
x.sort()
a=[]
for i in range(len(x)-1):
        a.append(x[i+1]-x[i])        

def gcd(m,n):
        while n:
                m,n = n,m%n
        return m

ans=a[0]
for j in a:
        if j%ans != 0:
                ans = gcd(j,ans)
print(ans)
N = int(input())
K = int(input())
if N%K == 0:
    print("0")
else:
    print("1")

### FIXED CODE ###

N, K = map(int,input().split())
if N%K == 0:
    print("0")
else:
    print("1")
N, Y = list(map(int, input().split()))
results = [-1, -1, -1]
for x in range(N + 1):
    for y in range(N - x + 1):
        z = (N - x - y)
        if 0 <= z <= 2000 and Y == 10000 * x + 5000 * y + 1000 * z:
            results = [x, y, z]
            print(results)
            exit()
print(results)

### FIXED CODE ###

s = input()
print(s.replace('2017', '2018'))
import math
import sys

def make_divisors(n):
    divisors = []
    hoge = 0
    if(n**0.5 > sys.maxint - 1):
      hoge = sys.maxint - 1
    else:
      hoge = int(n**0.5)
    for i in range(1, hoge+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

n = int(input())
print(make_divisors(math.factorial(n)) % (pow(10,9) + 7))

### FIXED CODE ###

import math
import collections

def trial_division(n):
    #素因数を格納するリスト
    factor = []
    #2から√n以下の数字で割っていく
    tmp = int(math.sqrt(n)) + 1
    for num in range(2,tmp):
        while n % num == 0:
            n //= num
            factor.append(num)
    #リストが空ならそれは素数
    factor.append(n)
    return factor

n = int(input())
c = collections.Counter([])
for num in range(2, n+1):
  prime_list = trial_division(num)
  c.update(prime_list)
res = 1
for prime, count in c.most_common():
  if(prime > 1):
    res = res * (count + 1)
print(res % (pow(10,9) + 7))
al = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 'q', 'u', 'v', 'w', 'x', 'y', 'z']
i = al.index(input())
print(al[i+1])


### FIXED CODE ###

C = input()
al = list("abcdefghijklmnopqrstuvwxyz")
print(al[al.index(C)+1])
x,y,z = map(string,input().split())
print(x[:1]+y[:1]+z[:1])


### FIXED CODE ###

x,y,z = (input().split())
print((x[:1]+y[:1]+z[:1]).upper())
import collections

num = int(input())
word_list = []
for i in range(num):
    word_list.append(input())
word_dict = collections.Counter(word_list)
word_list = [k for k,v in word_dict.items() if v == word_dict.most_common()[1][1]]
word_list.sort()
for word in word_list:
    print(word)

### FIXED CODE ###

import collections
import sys
input = sys.stdin.readline
num = int(input())
word_list = []
for i in range(num):
    word_list.append(input())
word_dict = collections.Counter(word_list)
most_common = word_dict.most_common()[0][1]
word_list = [k for k,v in word_dict.items() if v == most_common]
word_list.sort()
for word in word_list:
    print(word)
a, b=int(input())
if a==9 or b==9:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a, b=map(int,input())
if a==9 or b==9:
  print("Yes")
else:
  print("No")
def adx(p,oya,tox,total):
  tox[p] += total
  total = tox[p]
  if(len(oya[p]) == 0):
    return 0

  else:
    for i in oya[p]:
      adx(i,oya,tox,total)

  return 0

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

oya = [ [] for i in range(n + 1)]
tox = [0 for i in range(n + 1)]

hit = list(range(1,n+1))

for i in range(n-1):
  a,b = map(int,input().split())
  oya[a].append(b)

for i in range(q):
  p,x = map(int,input().split())
  tox[p] += x


adx(1,oya,tox,0)

tox.pop(0)

print(*tox)


### FIXED CODE ###

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

def addc(p,b):
  for i in e[p]:
    if(i == b):
      continue
    c[i] += c[p]
    addc(i,p)

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

e = [ [] for i in range(n + 1)]
c = [0]*(n+1)

for i in range(n-1):
  a,b = map(int,input().split())
  e[a].append(b)
  e[b].append(a)

for i in range(q):
  p,x = map(int,input().split())
  c[p] += x

addc(1,-1)

print(*c[1:])
n, k = map(int, input().split())
s = input()
s_re = re.split(r'(0+)', s)
srl = len(s_re)
m = [0] * srl
if (srl - 1 // 2) <= k:
    ans = n
else:
    for i, w in enumerate(s_re):
        m[i] = len(w)
    ans = [1]
    for i in range(0, srl, 2):
        ie = i + k * 2 + 1
        if ie <= srl:
            ans += [sum(m[i:ie])]
        else:
            break
print(max(ans))

### FIXED CODE ###

import re


n, k = map(int, input().split())
s = input()
s_re = re.split(r'(0+)', s)
srl = len(s_re)
m = [0] * srl
if srl // 2 <= k:
    ans = n
else:
    for i, w in enumerate(s_re):
        m[i] = len(w)
    tmp = sum(m[:k * 2 + 1])
    ans = tmp
    for i in range(0, srl, 2):
        ie = i + k * 2 + 1
        if ie < srl:
            tmp = tmp - m[i] - m[i+1] + m[ie] + m[ie+1]
            ans = max(ans, tmp)
        else:
            break
print(ans)
nk_list = list(map(int, input().split()))
n,k = nk_list[0], nk_list[1]

keta_lst = list()
for i in range(50):
    if i == 0:
        keta = 1
        keta_lst.append(keta)
    else:
        keta = 2*keta + 3
        keta_lst.append(keta)

paty_lst = list()
for i in range(50):
    if i == 0:
        paty = 1
        paty_lst.append(paty)
    else:
        paty = 2*paty+1
        paty_lst.append(paty)

def eat_paty(n,k):
    
    if n == 0 and k == 1:
        return 1
    
    keta_before = keta_lst[n-1]
    
    if k == 1:
        return 0
    elif k <= keta_before + 1:
        return eat_paty(n-1, k-1)
    elif k == keta_before + 2:
        return paty_lst[n-1]+1
    elif k <= 2*keta_before + 1:
        return paty_lst[n-1] + 1 + eat_paty(n-1, k-keta_before-2)
    elif k == 2*keta_before + 2:
        return 2 * paty_lst[n-1] + 1

print(eat_paty(n,k))

### FIXED CODE ###

nk_list = list(map(int, input().split()))
n,k = nk_list[0], nk_list[1]

keta_lst = list()
for i in range(50):
    if i == 0:
        keta = 1
        keta_lst.append(keta)
    else:
        keta = 2*keta + 3
        keta_lst.append(keta)

paty_lst = list()
for i in range(50):
    if i == 0:
        paty = 1
        paty_lst.append(paty)
    else:
        paty = 2*paty+1
        paty_lst.append(paty)

def eat_paty(n,k):
    
    if n == 0 and k == 1:
        return 1
    
    keta_before = keta_lst[n-1]
    
    if k == 1:
        return 0
    elif k <= keta_before + 1:
        return eat_paty(n-1, k-1)
    elif k == keta_before + 2:
        return paty_lst[n-1]+1
    elif k <= 2*keta_before + 1:
        return paty_lst[n-1] + 1 + eat_paty(n-1, k-keta_before-2)
    elif k > 2*keta_before + 1:
        return 2 * paty_lst[n-1] + 1

print(eat_paty(n,k))
import sys
H, W, M = map(int, input().split())
Hb = [0] * H
Wb = [0] * W
B = [[0] * W for _ in range(H)]
for _ in range(M):
    h, w = map(int, input().split())
    Hb[h - 1] += 1
    Wb[w - 1] += 1
    B[h - 1][w - 1] = 1
HB = max(Hb)
WB = max(Wb)
BB = [0] * W
for i in range(H):
    if Hb[i] == HB:
        for j in range(W):
            if B[i][j] == 1:
                BB[j] = 1
for i in range(W):
    if Wb[i] == WB:
        if BB[i] == 0:
            print(HB + WB)
            sys.exit()
print(HB + WB - 1)

### FIXED CODE ###

import sys
H, W, M = map(int, input().split())
Hb = [0] * H
Wb = [0] * W
B = set()
for _ in range(M):
    h, w = map(int, input().split())
    Hb[h - 1] += 1
    Wb[w - 1] += 1
    B.add((h - 1, w - 1))
HB = max(Hb)
WB = max(Wb)
x = set()
y = set()
for i in range(H):
    if Hb[i] == HB:
        y.add(i)
for i in range(W):
    if Wb[i] == WB:
        x.add(i)
for i in y:
    for j in x:
        if (i, j) not in B:
            print(HB + WB)
            sys.exit()
print(HB + WB - 1)
N = int(input())
H = list(map(int, input().split()))
# N = 4
# H = [10,30,40,20]
memo = {0:0,1:abs(H[1]-H[0])}
def dp(n):
    if n in memo:
        return memo[n]

    memo[n] = min(dp(n-2) + abs(H[n-2]-H[n]),dp(n-1) + abs(H[n-1]-H[n]))

    return memo[n]

print(dp(N-1))

### FIXED CODE ###

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

dp = [0]*N
for i in range(N):
  if i == 0:
    dp[i] = 0
  elif i == 1:
    dp[i] = abs(H[i]-H[i-1])
  else:
    dp[i] = min((dp[i-1]+abs(H[i]-H[i-1])),dp[i-2]+abs(H[i]-H[i-2]))
print(dp[-1])
r=map(int,raw_input().split())
print ('%f %f' % (float2*??*r,floatr*r*??)

### FIXED CODE ###

import math
r = float(raw_input())
print "%f %f" % (math.pi* r*r, math.pi*r*2)