Harryxun/stf_run huggingface dataset:
A, B, N = map(int, input().split())
f = [int(A*x/B) - (A * int(x/B)) for x range(N+1)]
print(max(f))

### FIXED CODE ###

def f(a, b, x):
  return int(a*x/b) - (a*int(x/b))
A, B, N = map(int, input().split())
print(f(A, B, min(B-1, N)))
n,k = map(int, input().split())
ans=0
for i in range(n):
	a = int(input())
	if a>=k:
	ans+=1
print(ans)

### FIXED CODE ###

n,k = map(int, input().split())
ans=0
list=list(map(int, input().split()))

for i in range(n):
	if list[i]>=k:
		ans+=1
print(ans)
s = list(map(int,input().split()))

c = [1,,4,7,9]

if s == c:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

s = list(map(int,input().split()))
s.sort()
c = [1,4,7,9]

if s == c:
    print('YES')
else:
    print('NO')
_, __, *d = map(int, open(0).read().split())
print(max(min(d[1::2]) - max(d[::2]) + 1), 0)

### FIXED CODE ###

_, __, *d = map(int, open(0).read().split())
print(max(min(d[1::2]) - max(d[::2]) + 1, 0))
import heapq
from sys import stdin

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

sushi = {}

for i in range(N):
    t,d = map(int, stdin.readline().split())
    if t in sushi.keys():
        sushi[t].append(d)
    else:
        sushi[t] = [d]

P = []
Q = []

for x in sushi.keys():
    sushi[x].sort(reverse = True)
    P.append(sushi[x][0])
    
    for i in range(1,len(sushi[x])):
        Q.append(sushi[x][i])

heapq.heapify(P)

Q = list(map(lambda x:-x,Q))
heapq.heapify(Q)

while len(P) > K:
    m = heapq.heappop(P)
    heapq.heappush(Q,-m)

cur = sum(P)
ans = cur + K**2

for i in range(K-1):
    p = heapq.heappop(P)
    cur -= p
    q = -heapq.heappushpop(Q,-p)
    cur += q
    ans = max(ans,cur+(K-i-1)**2)

print(ans)

### FIXED CODE ###

import heapq
from sys import stdin

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

sushi = {}

for i in range(N):
    t,d = map(int, stdin.readline().split())
    if t in sushi.keys():
        sushi[t].append(d)
    else:
        sushi[t] = [d]

P = []
Q = []

for x in sushi.keys():
    sushi[x].sort(reverse = True)
    P.append(sushi[x][0])
    
    for i in range(1,len(sushi[x])):
        Q.append(sushi[x][i])

heapq.heapify(P)

Q = list(map(lambda x:-x,Q))
heapq.heapify(Q)

while len(P) > K:
    m = heapq.heappop(P)
    heapq.heappush(Q,-m)

cur = 0

if K <= len(sushi.keys()):
    max_variation = K
else:
    max_variation = len(sushi.keys())
    for _ in range(K-max_variation):
        cur -= heapq.heappop(Q)

cur += sum(P)
ans = cur + max_variation**2

for i in range(max_variation-1):
    p = heapq.heappop(P)
    cur -= p
    q = -heapq.heappushpop(Q,-p)
    cur += q
    ans = max(ans,cur+(max_variation-i-1)**2)

print(ans)
import sys
n=input()
a=input()
b=input()
nn=int(n)
aa=int(a)
bb=int(b)

train=nn*aa
taxi=bb
if train>=taxi:
  print(train)
else:
  print(taxi)


### FIXED CODE ###

import sys

n,a,b=(int(x) for x in input().split())

train=n*a
taxi=b
if train>=taxi:
  print(taxi)
else:
  print(train)
W, H, w, y, r = map(int, input().split())

if (x -r) < 0 or (x + r) > W:
    print("No")

### FIXED CODE ###

w, h, x, y, r = map(int, input().split())

if x + r <= w and y + r >= 0 and x - r >= 0 and y + r <= h:
    print("Yes")
else:
    print("No")
def eratosthenes2(n):
    prime=[2]
    lim=int(n**0.5)
    d=[i+1 for i in range(2,n,2)]
    D=[2]*(n+1)
    D[0]=0
    D[1]=1
    while True:
        p=d[0]
        if lim<p:
            for x in d:
                D[x]=x
            prime=prime+d
            break
        prime.append(p)
        D[p]=p
        d2=[]
        for x in d:
            if x%p!=0:
                d2.append(x)
            else:
                D[x]=p
        d=d2
    return D
    
N=int(input())
A=list(map(int,input().split()))
maxA=max(A)
D=eratosthenes2(maxA)
count=[0]*(maxA+1)
for i in range(N):
    x=A[i]
    pre=x+1
    while x>1:
        if pre!=D[x]:
            count[D[x]]+=1
            pre=D[x]
        x//=D[x]
if max(count)==N:
    print('not coprime')
elif max(count)==1:
    print('pairwise coprime')
else:
    print('setwise coprime')

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
maxA=max(A)
count=[0]*(maxA+1)
for x in A:
    count[x]+=1
maxc=0
for i in range(2,maxA+1):
    maxc = max(maxc,sum(count[i::i]))

if maxc==N:
    print('not coprime')
elif maxc<=1:
    print('pairwise coprime')
else:
    print('setwise coprime')
n, a, b = map(int, input())
m = 10 ** 9 + 7

def combn(n, r, m):
    X = Y = 1
    if n-r < r:
        r = n-r
    for i in range(1, r+1):
        Y = Y*i % m
        X = X*(n-i+1) % m
    Y = pow(Y, m-2, m)
    return X*Y
  
print((pow(2, n, m) - 1 - combn(n, a, m) - combn(n ,b, m)) % m)

### FIXED CODE ###

n, a, b = map(int, input().split())
m = 10 ** 9 + 7

def combn(n, r, m):
    X = Y = 1
    if n-r < r:
        r = n-r
    for i in range(1, r+1):
        Y = Y*i % m
        X = X*(n-i+1) % m
    Y = pow(Y, m-2, m)
    return X*Y
  
print((pow(2, n, m) - 1 - combn(n, a, m) - combn(n ,b, m)) % m)
import sys
N = int(sys.stdin.readline())


def dev(x):
    global cnt
    if x % 2 == 0:
        cnt += 1
        dev(x / 2)
    return cnt


min_cnt = 0
for i in reversed(range((N + 1)//2, N + 1, 2)):
    cnt = 0
    result = dev(i)
    if min_cnt < result:
        min_i = i
        min_cnt = result
print(min_i)



### FIXED CODE ###

m = int(input())
a = 1
for c in range(7):
  if (2 ** c) > m:
    break
  a = (2 ** c)
 
print(a)
#!/usr/bin/env python3
import sys



def solve(H: int, W: int, A: "List[str]"):
    current = set()
    for i in range(W):
        for j in range(H):
            if not A[i][j]:
                current.add((i,j))
    def appendIfPossible(i,j,s):
        if i >= 0 and i < W and j >=0 and j < H and A[i][j]:
            s.add((i,j))
            A[i][j] = False
    count = 0
    while True:
        next = set()
        for c in current:
            appendIfPossible(c[0]-1,c[1],next)
            appendIfPossible(c[0]+1,c[1],next)
            appendIfPossible(c[0],c[1]-1,next)
            appendIfPossible(c[0],c[1]+1,next)
        current = next
        count+= 1
        if len(next) == 0:
            break
    print(count-1)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    A = [list(map(lambda x:x=='.',next(tokens))) for _ in range(H)]  # type: "List[str]"
    solve(H, W, A)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys



def solve(H: int, W: int, A: "List[str]"):
    current = set()
    for i in range(H):
        for j in range(W):
            if not A[i][j]:
                current.add((i,j))
    def appendIfPossible(i,j,s):
        if i >= 0 and i < H and j >=0 and j < W and A[i][j]:
            s.add((i,j))
            A[i][j] = False
    count = 0
    while True:
        next = set()
        for c in current:
            appendIfPossible(c[0]-1,c[1],next)
            appendIfPossible(c[0]+1,c[1],next)
            appendIfPossible(c[0],c[1]-1,next)
            appendIfPossible(c[0],c[1]+1,next)
        current = next
        count+= 1
        if len(next) == 0:
            break
    print(count-1)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    A = [list(map(lambda x:x=='.',next(tokens))) for _ in range(H)]  # type: "List[str]"
    solve(H, W, A)

if __name__ == '__main__':
    main()
def factors(z):
    ret = []
    for i in range(2, int(z**(1/2))+1):
        if z%i == 0:
            ret.append(i)
            while z%i == 0:
                z //= i
    if z != 1:
        ret.append(z)
    return ret

def eratosthenes(N):
    from collections import deque
    work = [True] * (N+1)
    work[0] = False
    work[1] = False
    ret = []
    for i in range(N+1):
        if work[i]:
            ret.append(i)
            for j in range(2* i, N+1, i):
                work[j] = False
    return ret

N = int( input())
A = [ int( input()) for _ in range(N+1)]
Primes = eratosththenes(N)
ANS = []
F = factors( abs(A[0]))
for f in F:
    if f >= N+1:
        Primes.append(f)
for p in Primes:
    if p >= N+1:
        check = 1
        for i in range(N+1): # f が恒等的に 0 であるかどうかのチェック
            if A[i]%p != 0:
                check = 0
                break
        if check == 1:
            ANS.append(p)
    else:
        poly = [0]*(p-1)
        for i in range(N+1): # フェルマーの小定理
            poly[(N-i)%(p-1)] = (poly[(N-i)%(p-1)] + A[i])%p
        check = 0
        if sum(poly) == 0 and A[N]%p == 0: # a_0 が 0 かつ、g が恒等的に 0 であることをチェックしている
            check = 1
        if check == 1:
            ANS.append(p)
for ans in ANS:
    print(ans)

### FIXED CODE ###

N = int( input())
S = input()
C = [0]*(N+1)
for i in range(N):
    if S[i] == ".":
        C[i+1] = C[i]
    else:
        C[i+1] = C[i] + 1
b = C[N]
w = N - b
ans = w
for i in range(N):
    if C[i+1] + N - i - 1 -b + C[i+1] < ans:
        ans = C[i+1] + N - i - 1 -b + C[i+1]
print(ans)
N = int(input())

ress = []

for i in range(1, int(N**0.5)):
    if N % i == 0:
        ress.append(i+N//i)

print(min(ress)-2)

### FIXED CODE ###

N = int(input())

ress = []

for i in range(1, int(N**0.5)+1):
    if N % i == 0:
        ress.append(i+N//i)

print(min(ress)-2)
N, M, K = map(int, input().split())

MOD = 10**9+7
fact = [1 for i in range(N+1)]
for i in range(2, N+1):
    fact[i] = fact[i-1] * i

def comb(n, r):
    return fact[n] // fact[n-r] // fact[r]

p = comb(N*M-2, K-2)
ans = 0
for i in range(N):
    for j in range(M):
        if i == 0 and j == 0:
            continue
        d = i+j
        #print(i, j, calc_rec_num(N, M, 0, 0, i, j))
        cnt = (N-i) * (M-j)
        if i != 0 and j != 0:
            cnt *= 2
        ans += d * cnt
        #if ans > DIV:
        #    ans %= DIV
        #print(ans)

print((ans*p)%MOD)


### FIXED CODE ###

from math import factorial
N, M, K = map(int, input().split())

MOD = 10**9+7

fact = [1] * (N*M+1)
for i in range(2, N*M+1):
    fact[i] = fact[i-1] * i % MOD

def comb(n, r):
    r = n-r if n-r < r else r
    return fact[n] * pow(fact[r], MOD-2, MOD) * pow(fact[n-r], MOD-2, MOD) % MOD

p = comb(N*M-2, K-2)
ans = 0
for i in range(N):
    for j in range(M):
        if i == 0 and j == 0:
            continue
        d = i+j
        cnt = (N-i) * (M-j)
        if i != 0 and j != 0:
            cnt *= 2
        ans += d * cnt % MOD
ans = ans * p % MOD

print(ans)
a,b=map(int,input().split())
if a*b%2=0:
    print("Even")
else:
    print("odd")

### FIXED CODE ###

a,b=map(int,input().split())
if a*b%2==0:
    print("Even")
else:
    print("Odd")
n,m,x=map(int,input().split())
a=[int(input())>x for i in range(m)]
print(a.count(True))


### FIXED CODE ###

N, M, X = map(int, input().split())
*A, = map(int, input().split())

print(min(len([x for x in A if x < X]), len([x for x in A if x > X])))
A = input()
B = input()
C = input()

if A==B==C:
    print("No")
elif A==B or B==C or C==A:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

N = input().split()
A = N[0]
B = N[1]
C = N[2]

if A==B==C:
    print("No")
elif A==B or B==C or C==A:
    print("Yes")
else:
    print("No")
n = input()
A = [input() for i in range(n)]

def insertionSort(A,n,g):
    cnt = 0
    for i in range(g,n):
        v = A[i]
        j = i - g
        while j >= 0 and A[j] > v:
            A[j+g] = A[j]
            j -= g
            cnt += 1
        A[j+g] = v

    return cnt

def shellSort(A,n):
    cnt = 0
    m = int((n-1)/3)
    G = [1]
    for i in range(1,n):
        g = 3**i
        if g > n:
            break
        G.append(G[i-1]+g)
    m = len(G)
    for i in range(m):
        j = (m-1) - i
        cnt = insertionSort(A,n,G[j])

    return m, G, cnt

m, G, cnt = shellSort(A,n)

print m
for i in range(m-1):
    j = m - i
    print G[j],
print G[0]

for item in A:
    print item

### FIXED CODE ###

n = input()
A = [input() for i in range(n)]

def insertionSort(A,n,g):
    cnt = 0
    for i in range(g,n):
        v = A[i]
        j = i - g
        while j >= 0 and A[j] > v:
            A[j+g] = A[j]
            j -= g
            cnt += 1
        A[j+g] = v

    return cnt

def shellSort(A,n):
    cnt = 0
    m = int((n-1)/3)
    G = [1]
    for i in range(1,n):
        gn = G[i-1]+3**i
        if gn > n:
            break
        G.append(gn)
    m = len(G)
    for i in range(m):
        j = (m-1) - i
        cnt += insertionSort(A,n,G[j])

    return m, G, cnt

m, G, cnt = shellSort(A,n)

print m

for i in range(1,m):
    j = m - i
    print G[j],
print G[0]

print cnt

for item in A:
    print item
N=int(input())
A=list(map(int,input().split()))
x=A[0]*N
for i in A:
    x[i-1]+=1
for j in x:
    print(j)

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
x=[0]*N
for i in A:
    x[i-1]+=1
for j in x:
    print(j)
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys

def dist(h, l, r):
    st = [(l, 0)]
    while len(st) > 0:
        i, d = st.pop()
        if i == r:
            break
        if not h[i][r]:
            st.append((r, d + h[i][r]))
            continue
        for j in range(r):
            if not h[i][j] or i == j:
                continue
            st.append((j, d + h[i][j]))

    return st[-1] if len(st) > 0 else 0


def main():
    (n, m) = tuple(map(int, input().split()))
    lrds = tuple(map(int, input().split()) for _ in range(m))

    h = [[None] * n] * n
    for lrd in lrds:
        (l, r, d) = lrd
        if not h[l][l]:
            h[l][l] = 0
        if not st[r][r]:
            h[r][r] = 0
        pd = dist(h, l, r)
        if pd != -1 and pd != d:
            print('No')
            sys.exit()
        h[l][r] = d
        h[r][l] = -d

    print('Yes')

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys

def main():
    n, m = map(int, sys.stdin.readline().split())
    lrds = ((map(int, line.split())) for line in sys.stdin.readlines())

    g = tuple([] for _ in range(n))
    x = [None] * n

    for l, r, d in lrds:
        l -= 1
        r -= 1
        g[l].append((r, d))
        g[r].append((l, -d))

    for i in range(n):
        if x[i] is not None:
            continue
        stack = [i]
        x[i] = 0
        while len(stack):
            v = stack.pop()
            for u, d in g[v]:
                if x[u] is None:
                    stack.append(u)
                    x[u] = x[v] + d

    for v in range(n):
        for u, d in g[v]:
            if x[v] + d != x[u]:
                print('No')
                sys.exit()

    print('Yes')

if __name__ == '__main__':
    main()
import numpy as np

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

train = []
quest = []
for i in range(setting[1]):
    num = list(map(int, input().split()))
    train.append(num)
train = np.array(train)

for i in range(setting[2]):
    q = list(map(int, input().split()))
    quest.append(q)

train = train * np.array([1,-1])
for qs in quest:
    a = train
    sch = np.array(qs)
    sch = sch * np.array([-1,1])
    b = a + sch
    ans = np.delete(b, np.where(b<0), axis=0)

    print(ans.shape[0])


### FIXED CODE ###

List = list(map(int, input().split()))
a = List[0]
b = List[1]
# a = int(input())
# b = int(input())

s = a*b - (a+b) +1

print(s)
import sys
import math
import itertools
import collections

def solve(N,M,K,A,B):
    accumA = [0,A.pop(0)]
    accumB = [0,B.pop(0)]
    for a in A:
        accumA.append(accumA[-1] + a)
    for b in B:
        accumB.append(accumB[-1] + b)
    ans = 0
    j = M
    for i in range(N + 1):
        if a[i] > K:
            break
        while b[j] > K - a[i]:
            j -= 1
        ans = max(ans,i + j)
    return ans

def main():
    N,M,K = map(int,input().split())
    A = list(map(int,input().split()))
    B = list(map(int,input().split()))
    # solve()
    print(solve(N,M,K,A,B))

if __name__ == "__main__":
    main()




### FIXED CODE ###



import sys
import math
import itertools
import collections

def solve(N,M,K,A,B):
    accumA = [0,A.pop(0)]
    accumB = [0,B.pop(0)]
    for a in A:
        accumA.append(accumA[-1] + a)
    for b in B:
        accumB.append(accumB[-1] + b)
    ans = 0
    j = M
    for i in range(N + 1):
        if accumA[i] > K:
            break
        while accumB[j] > K - accumA[i]:
            j -= 1
        ans = max(ans,i + j)
    return ans

def main():
    N,M,K = map(int,input().split())
    A = list(map(int,input().split()))
    B = list(map(int,input().split()))
    # solve()
    print(solve(N,M,K,A,B))

if __name__ == "__main__":
    main()
n,m=map(int,input().split())
ans=["a"]*n
for i in range(m):
    s,c=map(int,input().split())
    if s>n:
        pans="-1"
        break
    elif ans[s-1]=="a" or ans[s-1]==c:
        ans[s-1]=c 
        pans="0"
        if s==1 and c==0:
            pans="-1"
            break
    else:
        pans="-1"
        break
                
ans = [str(i) for i in ans]
if pans != "-1":
    pans="".join(ans)
    pans=pans.replace("a","0")
    if pans[0]=="0":
        pans='1' + pans[1:]
print(pans)

### FIXED CODE ###

n,m=map(int,input().split())
d=["a"]*n
ans=""
if n==1 and m==0:
    print(0)
    exit()
for i in range(m):
    s,c=map(str,input().split())
    if s=="1" and c=="0" and n==1:
        print(0)
        exit()
    s=int(s)
    if d[s-1]=="a" or d[s-1]==c:
        d[s-1]=c #置き換え
    else:
        ans="-1"
        print(ans)
        break
if d[0]!="0" and ans!="-1":
    if d[0]=="a" or d[0]=="0":
        print("".join(["1"]+d[1:]).replace("a","0"))
    else:
        print(("".join(d)).replace("a","0"))
elif d[0]=="0":
    print(-1)
n = input()
h = input().split()

hl = [int(int(h[i+1]) - int(h[i]) <= 0) for i in range(len(h) - 1)]
res = []
ct = 0

for i in range(len(hl) - 1):
  if hl[i] == 1:
    ct = ct + 1
  else:
    res.append(ct)
    ct = 0
    
if hl[len(hl) - 1] == 1:
  ct = ct + 1
else:
  pass

res.append(ct)
    
if len(res) == 0:
  print(0)
elif len(res) == 1:
  print(res[0])
else:
  print(max(res))


### FIXED CODE ###

n = input()
h = input().split()
res = []
ct = 0

for i in range(len(h) - 1):
  if int(h[i]) >= int(h[i+1]):
    ct = ct + 1
  else:
    res.append(ct)
    ct = 0

res.append(ct)

print(max(res))
N = int(input())
X = list(map(int, input().split()))

minX = min(X)
maxX = max(X)
li = []
for i in range(minX, maxX):
    temp = 0
    for j in range(N):
        temp += (X[j] - i)**2
    li.append(temp)

print(min(li))


### FIXED CODE ###

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

minX = min(X)
maxX = max(X)
li = []
for i in range(100):
    temp = 0
    for j in range(N):
        temp += (X[j] - i)**2
    li.append(temp)

print(min(li))
def main():
    n = int(input())
    A = list(map(int,input().split()))
    A.sort()
    A_max = A[-1]
    g = []
    table = [True]*(A_max+1)
    for i,a in enumerate(A):
        if table[i] and i!=n-1 and a != A[i+1]:
            g.append(a)
            for j in range(A_max//a):
                table[a*j] = False
    print(len(g))
main()

### FIXED CODE ###

import io,sys
sys.setrecursionlimit(10**6)

def main():
    import bisect
    n = int(input())
    A = list(map(int,sys.stdin.readline().rstrip().split()))
    A.sort()

    ans = 0
    a_max = A[-1]
    note = [True]*(a_max+1)
    for j in range(n):
        a = A[j]
        if note[a]:
            if j != n-1 and A[j]==A[j+1]:
                ans-=1
            ans+=1
            # for i in range(a,a_max+1):
            #     if i%a==0:
            #         note[i] = False
            temp = a 
            while temp <= a_max:
                note[temp]=False
                temp+=a

        
    
    print(ans)
main()
import fractions
n,m = map(int,input().split())
l = input().split()
for i in range(len(l) -1):
    lcm = (int(l[i]) * int(l[i + 1])) // fractions.gcd(int(l[i]), int(l[i + 1]))
x = m // (int(lcm)/2)
y = m // lcm
print(int(x-y))

### FIXED CODE ###

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
 
def div_ceil(x, y): return (x + y - 1) // y
 
N, M = map(int, input().split())
*A, = map(int, input().split())
A = list(set([a // 2 for a in A]))
L = A[0]
for a in A[1:]:
    L *= a // gcd(L, a)
for a in A:
    if (L // a) % 2 == 0:
        ans = 0
        break
else:
    ans = div_ceil(M // L, 2)
print(ans)
import random

D = int(input())
C = list(map(int,input().split()))
S = []
for i in range(D):
    S.append(list(map(int,input().split())))
t = [0]*365
lastds = [0]*26
satisfaction = [0]*26
for d in range(D):
    ans = 0
    for j in range(1,27):
        if d != 0:
            satisfaction[d] = satisfaction[d-1]
        else:
            satisfaction[d] = 0
        escape = lastds[j-1]
        lastds[j-1] = d+1
        satisfaction[d] += S[d][j-1]
        for i in range(26):
            satisfaction[d] -= C[i] * (d+1-lastds[i])
        if ans < satisfaction[d]:
            ans = satisfaction[d]
            t[d] = j
        lastds[j-1] = escape
    lastds[t[d]-1] = d+1
    print(t[d])


### FIXED CODE ###

import random

D = int(input())
C = list(map(int,input().split()))
S = []
for i in range(D):
    S.append(list(map(int,input().split())))
t = []
for i in range(D):
    t.append(int(random.uniform(1,27)))
    print(t[i])
def gcd(a, b):
  while b > 0:
    a, b = b, a%b
  return a

def lcm(a,b):
    return (a*b)/gcd(a, b)

N = int( input())
T = [ int( input()) for _ in range(N)]
ans = T[0]
for i in range(1,N):
    ans = int(lcm(ans,T[i]))
print(ans)

### FIXED CODE ###

def gcd(a, b):
  while b > 0:
    a, b = b, a%b
  return a

def lcm(a,b):
    return (a*b)//gcd(a, b)

N = int( input())
T = [ int( input()) for _ in range(N)]
ans = T[0]
for i in range(1,N):
    ans = lcm(ans,T[i])
print(ans)