Harryxun/stf_run huggingface dataset:
n=int(input())
dat = list(map(int, input().split()))

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

for e in dat:
     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()
import itertools

N = int(input())
balls = []

for i in range(N):
    x, y = map(int, input().split(' '))
    balls.append((x,y))

ans = 100
for pat in list(itertools.permutations(balls)):
    dic = {}
    l = list(pat)
    px = l[0][0]
    py = l[0][1]
    t_max = 0
    for i in range(1,len(l)):
        dx = l[i][0] - px
        dy = l[i][1] - py
        px = l[i][0]
        py = l[i][1]
        if (dx,dy) not in dic.keys():
            dic[(dx,dy)] = 1
        else:
            dic[(dx,dy)] += 1
            if (t_max < dic[(dx,dy)]):
                t_max = dic[(dx,dy)]
        kitai = + N - i
        if ans < (N - kitai):
            break
    d_max = max(dic.values())
    cost = N - d_max
    if (cost < ans):
        ans = cost

print(ans)


### FIXED CODE ###

N = int(input())
balls = []
for i in range(N):
    x, y = map(int, input().split(' '))
    balls.append((x,y))

if N == 1:
    print("1")
    exit()

dic = {}
for i in range(N):
    for j in range(i+1,N):
        dx = balls[j][0] - balls[i][0]
        dy = balls[j][1] - balls[i][1]
        if (dx,dy) not in dic.keys():
            dic[(dx,dy)] = 1
        else:
            dic[(dx,dy)] += 1
        dx *= -1
        dy *= -1
        if (dx,dy) not in dic.keys():
            dic[(dx,dy)] = 1
        else:
            dic[(dx,dy)] += 1

d_max = max(dic.values())
print(N - d_max)
import sys
from functools import lru_cache
sys.setrecursionlimit(20000000)
N, K = map(int, input().split())
heights = [int(h) for h in input().split()]


@lru_cache(None)
def dfs(i):
    if i == len(heights) - 1:
        return 0
    res = float("inf")
    for k in range(1, K + 1):
        if i + k < len(heights):
            res = min(res, abs(heights[i] - heights[i + k]) + dfs(i + k))
    return res


def helper():
    dp = [float(inf)] * len(heights)
    dp[0] = 0
    for i in range(1, len(heights)):
        dp[i] = min(dp[i],
                    min(dp[j] + abs(heights[j] - heights[i] for j in range(max(i - K, 0), i))))

    return dp[-1]


# print(dfs(0))
print(helper())


### FIXED CODE ###

n, k = [int(i) for i in input().split()]
h = [int(i) for i in input().split()]
 
def frog(n, k, h):
    d = [float('inf')] * n
    d[0] = 0
 
    for i in range(1, n):
        d[i] = min(
            d[j] + abs(h[i] - h[j]) for j in range(max(i - k, 0), i)
        )
    return d[n - 1]
 
 
print(frog(n, k, h))
import math
n = int(input())
a = list(map(int, input().split()))
l = [a[0]] * n
r = [a[n-1]] * n
for i in range(1, n):
    l[i] = math.gcd(l[i-1], a[i-1])
for i in range(n-2, -1, -1):
    r[i] = math.gcd(r[i+1], a[i+1])
l[0] = r[0]
r[n-1] = l[n-1]
ans = 0
for i in range(n):
    ans = max(ans, math.gcd(l[i], r[i]))
print(ans)

### FIXED CODE ###

def gcd(a, b):
    if a < b:
        tmp = a
        a = b
        b = tmp
    while b != 0:
        a, b = b, a%b
    return a

n = int(input())
a = list(map(int, input().split()))
l = [a[0]] * n
r = [a[n-1]] * n
for i in range(1, n):
    l[i] = gcd(l[i-1], a[i-1])
for i in range(n-2, -1, -1):
    r[i] = gcd(r[i+1], a[i+1])
l[0] = r[0]
r[n-1] = l[n-1]
ans = 0
for i in range(n):
    ans = max(ans, gcd(l[i], r[i]))
print(ans)
nab=list(map(int,input().split()))
v=list(map(int,input().split()))
v.sort(reverse=True)
vmin=v[:nab[1]]
print(sum(vmin)/len(vmin))
mini=1
if len(vmin)>1:
    for i in range(nab[1]):
        if vmin[-2-i]==vmin[-1]:
            mini+=1
        else:
            break
ex=0
if nab[1]<nab[2]:
    for i in range(nab[0]-nab[1]):
        if v[nab[1]+i]==vmin[0]:
            ex+=1
        else:
            break
def f(n):
    out=1
    for i in range(1,n+1):
        out*=i
    return out
m=min(nab[2]-nab[1],ex)
ans=int(f(min+ex)/(f(min)*f(ex)))
print(ans)


### FIXED CODE ###

nab=list(map(int,input().split()))
v=list(map(int,input().split()))
v.sort(reverse=True)
vmin=v[:nab[1]]
print(sum(vmin)/len(vmin))
mini=1
if nab[1]>1:
    for i in range(nab[1]-1):
        if vmin[-2-i]==vmin[-1]:
            mini+=1
        else:
            break
ex=0
for i in range(nab[0]-nab[1]):
    if v[nab[1]+i]==vmin[-1]:
        ex+=1
    else:
        break
def f(n):
    out=1
    for i in range(1,n+1):
        out*=i
    return out
ans=0
if vmin[0]!=vmin[-1]:
    ans=f(mini+ex)//(f(mini)*f(ex))
    print(ans)
else:
    m=min(nab[2]-nab[1],ex)
    for i in range(m+1):
        ans+=f(mini+ex)//(f(mini+i)*f(ex-i))
    print(ans)
a=input()
n=len(a)
if n%2==0:
    a1=a[:n//2]
    a2=a[n//2:]
else:
    a1=a[:n//2]
    a2=a[(n//2)+1:]
cnt=0
for x,i in enumerate(a1):
    if i!=a2[-x+1]:
        cnt+=1
print(cnt)

### FIXED CODE ###

a=input()
n=len(a)
if len(a)%2==0:
    a1=a[:n//2]
    a2=a[n//2:]
    a2=a2[::-1]
else:
    a1=a[:n//2]
    a2=a[n//2+1:]
    a2=a2[::-1]
cnt=0
for i in range(len(a1)):
    if a1[i]!=a2[i]:
        cnt+=1
print(cnt)
def main(n):
    count = 0

    for i in range(n + 1):
        if str(i).__len__ % 2 == 1:
            count += 1

    print(count)


if __name__ == "__main__":
    n = int(input())

    main(n)


### FIXED CODE ###

def main(n):
    count = 0

    for i in range(1, n + 1):
        if len(str(i)) % 2 == 1:
            count += 1

    print(count)


if __name__ == "__main__":
    n = int(input())

    main(n)
#coding: utf-8
import math
# from fractions import gcd

# GCDの約数を素因数分解する
def primeFactor(n):
    flg = 0
    count = 0
    tmp = math.sqrt(n)
    i = 2

    if n == 1:
        return 1

    while i <= tmp:
        # print(str(i)+str(',')+str(gcd_cnt))
        if n % i == 0:
            if flg == 0:
                flg = 1
                count += 1
            n = n // i
        else:
            flg = 0
            i += 1
    # if flg == 1:
    #     count += 1
    # print(str('素数=')+str(count)+str(' n=')+str(n)+str(' i=')+str(i))
    if n > 1:
        count += 1
    # 1を足す
    count += 1
    return count


# # print(len(div))
m,n = map(int,input().split())
p = math.gcd(m,n)
# print(str('gcd=')+ str(p))
ans = primeFactor(p)
print(ans)


### FIXED CODE ###

#coding: utf-8
from fractions import gcd
import math

# GCDの約数を素因数分解する
def primeFactor(n):
    flg = 0
    count = 0
    tmp = math.sqrt(n)
    i = 2

    if n == 1:
        return 1

    while i <= tmp:
        # print(str(i)+str(',')+str(gcd_cnt))
        if n % i == 0:
            if flg == 0:
                flg = 1
                count += 1
            n = n // i
        else:
            flg = 0
            i += 1
    # if flg == 1:
    #     count += 1
    # print(str('素数=')+str(count)+str(' n=')+str(n)+str(' i=')+str(i))
    if n > 1:
        count += 1
    # 1を足す
    count += 1
    return count


# # print(len(div))
m,n = map(int,input().split())
p = gcd(m,n)
# print(str('gcd=')+ str(p))
ans = primeFactor(p)
print(ans)
import math

list = input().split(' ')
num = int(list[0])
d = int(list[1])
ans = 0

for i in num:
  list2 = input().split(' ')
  x = list2[0]
  y = list2[1]
  distance = math.sqrt(x**2 + y**2)
  if distance <= d:
    ans += 1

print(ans)

### FIXED CODE ###

import math

list = input().split(' ')
num = int(list[0])
d = int(list[1])
ans = 0

for i in range(num):
  list2 = input().split(' ')
  x = int(list2[0])
  y = int(list2[1])
  distance = math.sqrt(x**2 + y**2)
  if distance <= d:
    ans += 1

print(ans)
a = int(input())
b = int(input())
c = int(input())
print(c, b, a)

### FIXED CODE ###

lst = list(map(int, input().split()))
print(lst[2], lst[0], lst[1])
#スペース区切りの整数の入力
N, K = map(int, input().split())
print(min(N%K),K-N%K)

### FIXED CODE ###

#スペース区切りの整数の入力
N, K = map(int, input().split())
if(N%K<K-N%K):
    print(N%K)
else:
    print(K-N%K)
S=input()
ans="WA"
if S[0]=="A" and S[2:-1].count("C")==1:
  s=S.find("C",2,-1)-
  SS=S[1:s]+S[s+1:]
  if SS.islower() is True:
    ans="AC"
print(ans)

### FIXED CODE ###

S=input()
ans="WA"
for i in range(len(S)):
  if S[i]=="A" and S[2:-1].count("C")==1:
    s=S.find("C",2,-1)-1
    SS=S[1:]
    SS=SS[:s]+SS[s+1:]
    if SS.islower() is True:
      ans="AC"
      break
print(ans)
temp=list(map(int,input().rstrip().split()))
n=temp[0]
S=temp[1]
summ=0
count=0
while summ<S :
    if (S-summ)>=n :
        summ+=n

        count+=1
    else :
        count+=1
        break
print(count)

### FIXED CODE ###

n = input()

print("Yes" if n.find('7') != -1 else "No")
S = input()
T = input()
ans = 0

for i in range(3):
	if S[i] == T[i]:
    	ans += 1

print(ans)

### FIXED CODE ###

S = input()
T = input()
ans = 0

for i in range(3):
    if S[i] == T[i]:
        ans += 1
        
print(ans)
N = int(input())
a = []
a.append(list(map(int, input().split())))

ans=0
while True:
    for i in range(N):
        if(a[i]%2 == 1):
            break:
    ans = ans+1

    for i in range(N):
        a[i] = a[i]/2

print(ans)
        

### FIXED CODE ###

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

ans=0
flag=0
while True:
    for i in range(N):
        if(a[i]%2 == 1):
            flag=1
    if flag == 1:
        break
    ans = ans+1

    for i in range(N):
        a[i] = a[i]/2

print(ans)
import math
import sys

for cnt, line in enumerate(sys.stdin):

    if cnt == 0:continue

    if cnt % 2 == 1: 
        a = int(line)
        continue
    else:
        b = int(line)

    if math.log10(a) > 79 or math.log10(b) > 79:
        print 'overflow'
    else:
        c = a + b
        if math.log10(c) > 79:
            print 'overflow'
        else:
            print c

### FIXED CODE ###

n = int(raw_input())

for i in range(n):
    a = raw_input()
    b = raw_input()

    if len(a) > 80 or len(b) > 80:
        print 'overflow'
    else:
        a, b = int(a), int(b)
        c = a + b
        if len(str(c)) > 80:
            print 'overflow'
        else:
            print c
N,K = map(int,input().split())
la = list(map(int,input().split()))
la = sorted(la,key=abs,reverse=True)
lg = la[:K]
lgp = []
lgm = []
lr = la[K:]
lrp = []
lrm = []
for a in lg:
    if a >= 0:
        lgp.append(a)
    else:
        lgm.append(a)
for a in lr:
    if a >= 0:
        lrp.append(a)
    else:
        lrm.append(a)
if len(lgm) % 2 == 1:
    if len(lrp) > 0:
        lg.pop(l.index(lgm[len(lgm) - 1]))
        lg.append(lrp[0])
    else:
        if len(lrm) > 0:
            if len(lgp) > 0:
                lg.pop(lg.index(lgp[len(lgp) - 1]))
                lg.append(lrm[0])
            else:
                lg = la[N - K:]
ans = 1
for a in lg:
    ans *= a
    ans %= 10 ** 9 + 7
print(ans)



### FIXED CODE ###

N,K = map(int,input().split())
la = list(map(int,input().split()))
la = sorted(la)
la = sorted(la,key=abs,reverse=True)
lg = la[:K]
lgp = []
lgm = []
lr = la[K:]
lrp = []
lrm = []
for a in lg:
    if a >= 0:
        lgp.append(a)
    else:
        lgm.append(a)
for a in lr:
    if a >= 0:
        lrp.append(a)
    else:
        lrm.append(a)
if len(lgm) % 2 == 1:
    if len(lrp) > 0 and len(lrm) > 0:
        if len(lgp) > 0 and len(lgm) > 0:
            if lgp[len(lgp) - 1] * lrp[0] > lgm[len(lgm) - 1] * lrm[0]:
                lg.pop(lg.index(lgm[len(lgm) - 1]))
                lg.append(lrp[0])
            else:
                lg.pop(lg.index(lgp[len(lgp) - 1]))
                lg.append(lrm[0])
        else:
            if len(lgp) > 0:
                lg.pop(lg.index(lgp[len(lgp) - 1]))
                lg.append(lrm[0])
            else:
                lg.pop(lg.index(lgm[len(lgm) - 1]))
                lg.append(lrp[0])
    elif len(lrp) > 0:
        if len(lgm) > 0:
            lg.pop(lg.index(lgm[len(lgm) - 1]))
            lg.append(lrp[0])
        else:
            lg = la[N - K:]
    elif len(lrm) > 0:
        if len(lgp) > 0:
            lg.pop(lg.index(lgp[len(lgp) - 1]))
            lg.append(lrm[0])
        else:
            lg = la[N - K:]
ans = 1
for a in lg:
    ans *= a
    ans %= 10 ** 9 + 7
print(ans)
mod=1000000007
def Fib(n):
  a, b = 1, 2
  if n == 1 or n==0:
    return a
  elif n == 2:
    return b
  else:
    for i in range(n-2):
      a, b = b%mod, (a+b)%mod
    return b
n,m=map(int,input().split())
al=[]
zeroflag=0
fa=-1
cnt=0
for iii in range(m):
  a=int(input())
  cnt+=1
  al.append(a)
  if abs(fa-a)==1:
    zeroflag=1
  fa=a

if zeroflag==1:
  print(0)
else:
  ans=1
  for iii in range(m):
    if iii==0:
      ans=Fib(al[iii]-1)
    if iii==m-1:
      break
    if len(al)>1:  
      num=Fib(al[iii+1]-al[iii]-2)
      ans*=num%mod
  ans*=Fib(n-al[-1]-1)%mod
  print(ans%mod)

### FIXED CODE ###

mod=1000000007
def Fib(n):
  a, b = 1, 2
  if n == 1 or n==0:
    return a
  elif n == 2:
    return b
  else:
    for i in range(n-2):
      a, b = b%mod, (a+b)%mod
    return b
n,m=map(int,input().split())
al=[]
zeroflag=0
fa=-1
cnt=0
for iii in range(m):
  a=int(input())
  cnt+=1
  al.append(a)
  if abs(fa-a)==1:
    zeroflag=1
  fa=a

if zeroflag==1:
  print(0)
else:
  ans=1
  if m==0:
    print(Fib(n))
  else:
    for iii in range(m):
      if iii==0:
        ans=Fib(al[iii]-1)
      if iii==m-1:
        break
      if len(al)>1:  
        num=Fib(al[iii+1]-al[iii]-2)
        ans*=num%mod
    ans*=Fib(n-al[-1]-1)%mod
    print(ans%mod)
#include <bits/stdc++.h>
using namespace std;

int main() {
    int N;
    cin >> N;
    vector<string> S(N);
    for(int i=0;i<N;i++) {
        cin >> S.at(i);
    }
    sort(S.begin(),S.end());
    S.erase(unique(S.begin(),S.end()),S.end());
    cout << (int)S.size() << endl;
}

### FIXED CODE ###

N = int(input())
S = []
for i in range(N) :
    S.append(input())

print(len(set(S)))
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))

N = int(input())
x = 0
ans = [0 for _ in range(N)]
maxv = ceil(sqrt(N)) + 1
for x in range(1, maxv):
    for y in range(1, maxv):
        for z in range(1, maxv):
            f = x*x + y*y + z*z + x*y + y*z + z*x - 1
            if f > N: continue
            ans[f] += 1
for i in range(N):
    print(ans[i])

### FIXED CODE ###

import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))

N = int(input())
x = 0
ans = [0 for _ in range(N)]
maxv = ceil(sqrt(N)) + 1
for x in range(1, maxv):
    for y in range(1, maxv):
        for z in range(1, maxv):
            f = x*x + y*y + z*z + x*y + y*z + z*x - 1
            if f > N-1: continue
            ans[f] += 1
for i in range(N):
    print(ans[i])
number = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
N = int(input())
print(number[N])

### FIXED CODE ###

number = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
N = int(input())
print(number[N-1])
a, b, k = map(int, input().split())

l = list(range(a, b + 1))
ans = []
ans.extend(l[:min(k,len(l))])
ans.extend(l[max(0,len(l) - k):])

ans = sorted(list(set(ans)))
for a in ans:
   print(a)

### FIXED CODE ###

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

for i in range(a, min(b, a + k - 1) + 1):
    print(i)
for i in range(max(a + k, b - k + 1), b + 1):
    print(i)

exit()
l = list(range(a, b + 1))
ans = []
ans.extend(l[:min(k,len(l))])
ans.extend(l[max(0,len(l) - k):])

ans = sorted(list(set(ans)))
for a in ans:
   print(a)
while True:
 n,x=map(int,raw_input().split())
 count=0
 for i in range(1,n+1):
  for j in range(i+1,n+1):
   for k in range(j+1,n+1):
    print str(i)+" "+str(j)+" "+str(k)
    if i+j+k==x:
	 count+=1	 
 print count

### FIXED CODE ###

while True:
 n,x=map(int,raw_input().split())
 if n==0 and x==0:break
 count=0
 for i in range(1,n+1):
  for j in range(i+1,n+1):
   for k in range(j+1,n+1):
    
    if i+j+k==x:
	 count+=1	 
 print count
from collections import Counter

n=int(split())
l=[input() for i in range(n)]
c=Counter(l)
d=max(c.values())
max_list=[k for k,v in c.items() if v==d]
max_list.sort()
for j in max_list:
  print(j)

### FIXED CODE ###

n = int(input())
s = [input() for _ in range(n)]
d = {}
for w in s:
    if w not in d:
        d[w] = 0
    d[w] += 1
d2 = sorted(d.items(), key=lambda x:x[1], reverse=True)
maxcnts = [w[0] for w in d2 if w[1] == d2[0][1]]
maxcnts.sort()
for ans in maxcnts:
    print(ans)
n, a, b = map(int, input().split())
ans = n//(a+b)*a
rem = n%(a+b)
if rem>=a:
    print(ans+a)
else 
    print(ans + rem)

### FIXED CODE ###

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

ans = n//(a+b)*a
ans += min(a, n%(a+b))

print(ans)
import math
A,B,N=map(float,input().split())
if N = B:
    N = N-1
ans = math.floor((A*N/B)) - A*math.floor(N/B)
print(int(ans))

### FIXED CODE ###

import math
A,B,N=map(float,input().split())
if N >= B:
    N = B-1
ans = math.floor(A*N/B) - A*math.floor(N/B)
print(int(ans))
# -*- coding: utf-8 -*-

n,q = map(int,input().split())
s = input()
lr = []
for i in range(0,q):
    lr.append(input().split())
map(int,lr)

ei = []
for index, item in enumerate(s):
    if index == n - 1:
        break
    if s[index] == "A" and s[index + 1] == "C":
        ei.append(index)
        ce.append(index+1)

for i in range(0,q):
    sum = 0
    for j in range(int(lr[i][0])-1,int(lr[i][1])):
        if j in ei:
            sum += 1
    if int(lr[i][1])-1 in ei:
        sum -= 1
    print(sum)

print(ei)


### FIXED CODE ###

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

n, q = map(int,input().split())
s = list(input())
l = [0] * q
r = [0] * q
for i in range(q):
    l[i],r[i] = map(int,input().split())

aclist = []

cnt = 0
for i in range(n):
    if s[i-1] == "A" and s[i] == "C":
        cnt += 1
        aclist.append(cnt)
    else:
        aclist.append(cnt)

for i in range(q):
    print(aclist[r[i]-1] - aclist[l[i]-1])
H, W = map(int, input().split())
s="#"*W+"".join("#"+input() for _ in range(H))
f=(W+1)*(H+1)
d=[[0]*f for _ in range(f)]
for i in range(W,f-1):
 d[i][i-1]=s[i]==s[i-1]=="."
 d[i][i-W-1]=s[i]==s[i-W-1]=="."
from scipy.sparse.csgraph import csgraph_from_dense as C,floyd_warshall as F
Q=F(C(d),directed=False)
r=-1
for q in Q:
 for x in q:
  if f>x:
   r=max(r,int(x))
print(r)

### FIXED CODE ###

H, W = map(int, input().split())
s = "#"*(W+2)
for _ in range(H):
    s+="#"+input().strip()+"#"
s += "#"*(W+2)

#for i, c in enumerate(s):
#    print(i, c)
ff = (W+2)*(H+2)
from scipy.sparse.csgraph import csgraph_from_dense,floyd_warshall
dp = [[-1]*ff for _ in range(ff)]
for i in range(1, H+1):
    for j in range(1, W+1):
        u = j+(W+2)*i
        v = j+(W+2)*(i-1)
        if s[u] == "." and s[u-1] == ".":
#            print(u,u-1)
            dp[u][u-1] = 1
        if s[u] == "." and s[v] == ".":
#            print(u,v)
            dp[u][v] = 1
#print(dp)
G = csgraph_from_dense(dp,  null_value=-1)
Q = floyd_warshall(G, directed=False)
r = -1
for q in Q:
    for x in q:
        if x < 10**9:
            r = max(r, int(x))
print(r)
n,k = map(int,input().split())
h = list(map(int,input().split()))
dp = [float("inf")]*n
dp[0] = 0
def chmin(a,b):
  if a>b:
    a = b
    return true
  else:
    return false
for i in range(0,n):
  for j in range(1,k+1):
    chmin(dp[i+j],dp[i]+abs(h[i]-h[i+j]))
print(dp[-1])

### FIXED CODE ###

def solve():
  n,k = map(int,input().split())
  h = list(map(int,input().split()))
  dp = [float("inf")]*n
  dp[0] = 0
  for i in range(0,n-1):
    for j in range(1,k+1):
      if (i-j)>=-1:
        dp[i+1]=min(dp[i+1],dp[i+1-j]+abs(h[i+1]-h[i+1-j]))
  print(dp[-1])
solve()
A, B = map(int, input().split())
def gcd(x, y):
        while y != 0:
            x, y = y, x%y
        return x
    
def factorize(n):
    factor = []
    for num in range(2, n*n+1):
        while n % num == 0:
            n //= num
            factor.append(num)
    return factor
    
g = gcd(A, B)
f = factorize(g)
print(len(f)+1)

### FIXED CODE ###

N = int(input())
if N % 2 == 0:
    print(1 / 2)
else:
    print((N - (((N + 1) / 2) -1)) / N)
while 1:
 x,h=int(input()),int(input())
 if x:print(x*x+((x/2)**2+h**2)**.5*x*2)


### FIXED CODE ###

for x in iter(input,'0'):x=int(x);print(x*x+2*x*((x/2)**2+int(input())**2)**.5)
import sys
def 解():
    iN = int(sys.stdin.readline())
    aT = [int(_) for _ in sys.stdin.readlines()]

    #公倍数を求めるだけ

    def fgcd(a,b):
        while b:
            a,b = b, a%b
        return a

    lcm = aT[0] * aT[1] // fgcd(aT[0],aT[1])
    for a in aT[2:]:
        lcm = lcm * a // fgcd(lcm,a)
    print(lcm)
解()


### FIXED CODE ###

import sys
def 解():
    iN = int(sys.stdin.readline())
    aT = [int(_) for _ in sys.stdin.readlines()]
    #公倍数を求めるだけ
    def fgcd(a,b):
        while b:
            a,b = b, a%b
        return a

    lcm = aT[0]
    for a in aT[1:]:
        lcm = lcm * a // fgcd(lcm,a)
    print(lcm)
解()