Harryxun/stf_run huggingface dataset:
N = int(input())
a = list(map(int, input().split()))
l = a[0]
for i in range(1,N):
  l = l * a[i] // math.gcd(l, a[i])
m = l-1
fm = 0
for i in range(N):
  fm += m % a[i]
print(fm)

### FIXED CODE ###

import fractions

N = int(input())
a = list(map(int, input().split()))
l = a[0]
for i in range(1,N):
  l = l * a[i] // fractions.gcd(l, a[i])
m = l-1
fm = 0
for i in range(N):
  fm += m % a[i]
print(fm)
S = input()
T = 0
for i in range(len(S)//2):
  if S[i] != S[K//2 + i +1]:
    T+=1
print(T)

### FIXED CODE ###

S = input()
T = 0
for i in range(len(S)//2):
  if S[i] != S[len(S) -1 -i]:
    T+=1
print(T)
a,b=str(int,input().split())
print((a-1)*(b-1))

### FIXED CODE ###

a,b=map(int,input().split())
print((a-1)*(b-1))
d=int(input())
t=int(input())
s=int(input())
if d/s<=t:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

d,t,s = map(int,input().split())
if t*s >= d:
    print("Yes")
else:
    print("No")
n, k = map(int, input().split())
l = n % k

if (n < k):
    print(k % n)
elif (n >= k):
    if (l == 0):
        print(0)
    else:
        print(abs(k - n))

### FIXED CODE ###

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

print(min(l, abs(l - k)))
print("ABC" if s[1] == "R" else "ARC")

### FIXED CODE ###

print('ABC' if input()[1] == 'R' else 'ARC')
import sys

# import re
import math
import collections
# import decimal
# import bisect
# import itertools
# import fractions
# import functools
import copy
# import heapq
import decimal
# import statistics
import queue

sys.setrecursionlimit(10000001)
INF = 10 ** 16
MOD = 10 ** 9 + 7

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


# ===CODE===


def main():
    a, b = ns()

    g = math.gcd(a, b)

    def search(n):
        i = 2
        so = set()
        while n != 1:
            while n % i == 0:
                n //= i
                so.add(i)
            i += 1

    print(len(search(g)) + 1)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys

# import re
import math
import collections
# import decimal
# import bisect
# import itertools
import fractions
# import functools
import copy
# import heapq
import decimal
# import statistics
import queue

sys.setrecursionlimit(10000001)
INF = 10 ** 16
MOD = 10 ** 9 + 7

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


# ===CODE===


def main():
    a, b = ns()

    g = fractions.gcd(a, b)

    def search(n):
        i = 2
        so = []
        while not(n == 1 or i * i > n):
            while n % i == 0:
                n //= i
                so.append(i)
            i += 1
        if n != 1:
            so.append(n)

        return so

    ans = set(search(g))
    print(len(ans) + 1)


if __name__ == '__main__':
    main()
def main():
    A, B = map(int, input().split())
    if A <=10 and B <=10:
        p = A * B
        print(p)
    else:
        print(p)
main()

### FIXED CODE ###

def main():
    A, B = map(int, input().split())
    if A < 10 and B < 10:
        p = A * B
        print(p)
    else:
        print(-1)
main()
N,A,B = map(int,input().split())
n = N // (A+B)
ans = A * n
m = N % n
if m > A:
    print(ans+A)
else:
    print(ans+m)


### FIXED CODE ###

N,A,B = map(int,input().split())
if A ==0 :
    print(0)
elif B==0:
    print(N)
else:
    m = N % (A+B)
    n = N // (A+B)
    ans = A * n
    if m > A:
        print(ans+A)
    else:
        print(ans+m)
a,b = [int(i) for i in input().split()]

if a<b:
    print("a<b")

elif a>b:
    print("a>b")

else a=b:
    print("a=b")

### FIXED CODE ###

a, b = [int(i) for i in input().split()]

if a < b:
   print("a < b")


elif a > b:
     print("a > b")


else:
  print("a == b")
X=int(input())
if (X==3 || X==5 ||X==7):
  print('YES')
else:
  print('NO')

### FIXED CODE ###

x=input()
if x in "753":
    print("YES")
else:
    print("NO")
#input
r_1, c_1, r_2, c_2 = map(int, input().split())

#output
mod = 10**9 + 7

n_ = 10**5 + 3
fun = [1]*(n_+1)
for i in range(1,n_+1):
    fun[i] = fun[i-1]*i%mod
rev = [1]*(n_+1)
rev[n_] = pow(fun[n_],mod-2,mod)
for i in range(n_-1,0,-1):
    rev[i] = rev[i+1]*(i+1)%mod
def cmb(n,r):
    if n <= 0 or r < 0 or r > n: return 0
    return fun[n]*rev[r]%mod*rev[n-r]%mod

answer = 0
for i in range(r_1, r_2+1):
    for j in range(c_1, c_2+1):
        answer += cmb(i+j, j) % mod
print(answer % mod)

### FIXED CODE ###

#input
r_1, c_1, r_2, c_2 = map(int, input().split())

#output
mod = 10**9 + 7

n_ = 2*10**6 + 1
fun = [1]*(n_+1)
for i in range(1,n_+1):
    fun[i] = fun[i-1]*i%mod
rev = [1]*(n_+1)
rev[n_] = pow(fun[n_],mod-2,mod)
for i in range(n_-1,0,-1):
    rev[i] = rev[i+1]*(i+1)%mod
def cmb(n,r):
    if n <= 0 or r < 0 or r > n: return 0
    return fun[n]*rev[r]%mod*rev[n-r]%mod

answer = 0
for j in range(c_1, c_2+1):
    answer += cmb(r_2+j+1, j+1) % mod - cmb(r_1+j, j+1) % mod

print(answer % mod)
S = input()

r = 1
arr = [0]
for c in S[::-1]:
  arr.append((arr[-1] + int(c) * r) % 2019)
  r *= 10
  r %= 2019
from collections import Counter
ctr = Counter(arr)
ans = 0
for v in ctr.values():
  ans += v*v(v-1)//2
print(ans)

### FIXED CODE ###

S = input()
r = 1
arr = [0]

for c in S[::-1]:
  arr.append((arr[-1] + int(c) * r) % 2019)
  r *= 10
  r %= 2019
from collections import Counter
ctr = Counter(arr)
ans = 0
for v in ctr.values():
  ans += v*(v-1)//2
print(ans)
n = int(input())
a_list = list(map(int, input().split()))
sum_a = sum(a_list)
num_a = [0]*(10**5)
for i in a_list:
    num_a[i] += 1
    
q = int(input())
for _ in range(q):
    b, c = list(map(int, input().split()))
    sum_a = sum_a + c * num_a[b] - b *num_a[b]
    num_a[c] += num_a[b]
    num_a[b] = 0
    print(sum_a)

### FIXED CODE ###

n = int(input())
a_list = list(map(int, input().split()))
sum_a = sum(a_list)
num_a = [0]*(10**5)
for i in a_list:
    num_a[i-1] += 1
    
q = int(input())
for _ in range(q):
    b, c = list(map(int, input().split()))
    sum_a = sum_a + c * num_a[b-1] - b *num_a[b-1]
    num_a[c-1] += num_a[b-1]
    num_a[b-1] = 0
    print(sum_a)
import collections

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

B=collections.deque([])
for i,a in enumerate(A):
  if i%2==0:
    B.append(a)
  else:
    B.appendleft(a)
if N%2==1:
  B=B[::-1]

print(" ".join(map(str,B)))

### FIXED CODE ###

import collections

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

B=collections.deque([])
for i in range(N):
  if i%2==0:
    B.append(A[i])
  else:
    B.appendleft(A[i])
#print(B)
B=list(B)
#print(B)
if N%2==1:
  B=B[::-1]

print(" ".join(map(str,B)))
N = int(input())
A = [int(i) for i in input().split()]

counts = [0]*9

for i in A:
    counts[int(i/400)] += 1

#print(counts)

v = 8 - counts[:-1].count(0)

if counts[-1] == 0:
    print(v,v)
else:
    if v == 0:
        print(1,counts[-1])
    else :
        print(v,v+counts[-1])






### FIXED CODE ###

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

counts = [0]*9

for i in A:
    color = int(i/400)
    if color > 8:
        color = 8
    counts[color] += 1

#print(counts)

v = 8 - counts[:-1].count(0)

if counts[-1] == 0:
    print(v,v)
else:
    if v == 0:
        print(1,counts[-1])
    else :
        print(v,v+counts[-1])
from decimal import *
import numpy as np
getcontext().prec = 50
a, b, c = map(int, input().split())
tmp1 = Decimal(np.sqrt(a)) + Decimal(np.sqrt(b))
tmp2 = Decimal(np.sqrt(c))

if tmp1 < tmp2:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

import string
def dfs(w, d):
    if len(w) == N:
        print(w)
        return
    for i in range(d + 1):
        if i == d:
            dfs(w + wordlst[i], d + 1)
        else:
            dfs(w + wordlst[i], d)

N = int(input())
anslst = []
nlst = [0] * N
wordlst = string.ascii_lowercase
dfs('a', 1)
a=int(input())
b=int(7)
if a in b:
    print('yes')
else a in b:
    print('no')


### FIXED CODE ###

p=list(input())
a=int(p[0])
b=int(p[1])
c=int(p[2])
if a==7 or b==7 or c==7:
	print('Yes')
else:
	print('No')
import sys
sys.setrecursionlimit(10**5)
n,k = map(int,input().split())
l = list(map(int,input().split()))
def trans(n):
    if n == 1:
        return l[0]
    else:
        return l[trans(n-1)-1]
print(trans(k)) 

### FIXED CODE ###

n,k = map(int,input().split())
l = [-1]+list(map(int,input().split()))

visited = [-1]+[False]*n

i = 1
while True:
    if visited[i]:
        fragrant = i
        break
    else:
        visited[i] = True
        i = l[i]

i = fragrant
cnt = 1
while l[i] != fragrant:
    cnt += 1
    i = l[i]
# print(cnt)

i = 1
while k > 0:
    i = l[i]
    k -= 1
    if i == fragrant:
        k %= cnt
print(i)
n,a,b = map(int,input().split())

count = 0
p = 10**9+7

def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

fact = [1, 1]
factinv = [1, 1]
inv = [0, 1]

range2_n1 = range(2, n+1)
range1_n1 = range(1, n+1)

for i in range2_n1:
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

for m in range1_n1:
    if not (m == a or m == b):
        count += cmb(n,m,p)
        count %= p

print(count)

### FIXED CODE ###

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

if n<10:
    print(r+(100*(10-n)))
else:
    print(r)
import math
h= int(input())
a= int(input())
result = math.ceil(h/a)
print(result)




### FIXED CODE ###

import math
h,a = map(float,input().split())
result = math.ceil(h/a)
print(result)
n=int(input())
i=1
while 2**i<=n:
    s=i
    i+=1
print(s)


### FIXED CODE ###

n=int(input())
i=0
while 2**i<=n:
    s=2**i
    i+=1
print(s)
n, d, a = map(int, input().split())
XH = [tuple(map(input().split())) for i in range(n)]
XH.sort()
X = [x for x, h in XH]
H = [h for x, h in XH]
X.append(10**10)
H.append(0)
j = 0
S = [0]*(n+1)
ans = 0
for i in range(n):
    H[i] = max(0, H[i]-S[i])
    c = -(-H[i]//a)
    while X[j] <= X[i] + 2*d:
        j += 1
    S[i+1] += S[i] + a*c
    S[j] -= a*c
    ans += c
print(ans)


### FIXED CODE ###

n, d, a = map(int, input().split())
XH = []
for i in range(n):
    x, h = map(int, input().split())
    XH.append((x, h))
XH.sort()
X = [x for x, h in XH]
H = [h for x, h in XH]
# n, d, a = 9, 2, 2
# X = [1, 3, 4, 6, 9, 10, 12, 13, 16]
# H = [7, 6, 7, 5, 10, 3, 8, 9, 6]
X.append(10**10)
H.append(0)
j = 0
c = 0
S = [0]*(n+1)
for i in range(n):
    H[i] = max(0, H[i]-S[i])
    c += -(-H[i]//a)
    while X[j] <= X[i] + 2*d:
        j += 1
    S[i+1] += S[i] + -(-H[i]//a)*a
    S[j] -= -(-H[i]//a)*a
    # print(i)
    # print(H)
    # print(S)
# print(H)
# print(S)
print(c)
a,*b,c = input()split()
print(a+str(len(b))+c)

### FIXED CODE ###

s = input()
print(s[0]+str(len(s)-2)+s[-1])
from random import random
import math
import re
import fractions

S = raw_input()
pc = S.index("C")
pf = S.rindex("F")
if pc > -1 and pf > -1 and pc < pf:
    print "Yes"
else:
    print "No"


### FIXED CODE ###

S = raw_input()

pc = S.index("C") if "C" in S else -1
pf = S.rindex("F") if "F" in S else -1
if pc > -1 and pf > -1 and pc < pf:
    print "Yes"
else:
    print "No"
arg = input()
a = (int)(arg.split())[0]
b = (int)(arg.split())[1]
c = (int)(arg.split())[2]
d = (int)(arg.split())[3]

while true:
  a = a - d
  if a <= 0:
    print('No')
    break
  c = c - b
  if c <= 0:
	print('yes')
	break

### FIXED CODE ###

arg = input()
a = int((arg.split())[0])
b = int((arg.split())[1])
c = int((arg.split())[2])
d = int((arg.split())[3])

while True:
    c -= b
    if c <= 0:
        print('Yes')
        break
    a -= d
    if a <= 0:
        print('No')
        break
import sys
input = sys.stdin.readline
n = int(input())
a = [int(input()) for i in range(n)]
cnt = 1
ans = 0
for i in range(n):
  if a[i] = cnt+1:
    cnt += 1
  else:
    ans += (a[i]-1)//cnt
    if cnt == 1:
      cnt += 1
print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.readline
n = int(input())
a = [int(input()) for i in range(n)]
cnt = 2
ans = a[0]-1
for i in range(1,n):
  if a[i] == cnt:
    cnt += 1
  else:
    ans += (a[i]-1)//cnt
print(ans)
= int(input())
L = list(map(int, input().split()))
L.sort()
if sum(L[:-1]) > L[-1]:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N = int(input())
L = list(map(int, input().split()))
L.sort()
if sum(L[:-1]) > L[-1]:
  print("Yes")
else:
  print("No")
import numpy as np
N = int(input())
my_result = N * np(pi)
print(my_result)

### FIXED CODE ###

N = int(input())
my_result = N * 2 * 3.14159265
print(my_result)
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np
import queue

n,m,k = map(int, input().split())
for i in range(n):
  for j in range(m):
    if i * (m - j) + j * (n - i) == k:
      print('Yes')
      exit(-1)
print('No')


### FIXED CODE ###

# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np
import queue

n,m,k = map(int, input().split())
for i in range(n + 1):
  for j in range(m + 1):
    if n * j + m * i - 2 * i * j == k:
      print('Yes')
      exit(0)
print('No')
a,b,c=int(input().split());print(("No","Yes")[a<=c<=b])

### FIXED CODE ###

a,b,c=map(int,input().split());print(("No","Yes")[a<=c<=b])
import sys
import math
import fractions
import time
import random
from collections import deque
from collections import defaultdict
sys.setrecursionlimit(10**7)

start = time.perf_counter()

D = int(input())
c = list(map(int, input().split()))
s = []
last = [0] * 26
for _ in range(D):
    line = list(map(int, input().split()))
    s.append(line)


def calc_one_score(t, d, sat):
    t -= 1
    sat += s[d][t]
    last[t] = d + 1
    for i in range(26):
        sat -= c[i] * (d + 1 - last[i])
    return sat


def calc_score(ts):
    sat = 0
    for d in range(D):
        sat = calc_one_score(ts[d], d, sat)
    return sat


max_score = 0

ts = [1, 17, 13, 14, 13]
while time.perf_counter() - start < 1.70:
    last = [0] * 26
    score = calc_score(ts)
    if max_score < score:
        max_score = score
        # print(ts, score)
    else:
        ts[d] = old
    d = random.randrange(D)
    i = random.randrange(1, 27)
    old = ts[d]
    ts[d] = i

for t in ts:
    print(t)
# print(max_score)


### FIXED CODE ###

import sys
import math
import fractions
import time
import random
from collections import deque
from collections import defaultdict
sys.setrecursionlimit(10**7)

start = time.perf_counter()

D = int(input())
c = list(map(int, input().split()))
s = []
last = [0] * 26
for _ in range(D):
    line = list(map(int, input().split()))
    s.append(line)


def calc_one_score(t, d, sat):
    t -= 1
    sat += s[d][t]
    last[t] = d + 1
    for i in range(26):
        sat -= c[i] * (d + 1 - last[i])
    return sat


def calc_score(ts):
    sat = 0
    for d in range(D):
        sat = calc_one_score(ts[d], d, sat)
    return sat


max_score = -1000000000000

ts = [1] * D
while time.perf_counter() - start < 1.70:
    last = [0] * 26
    score = calc_score(ts)
    d = random.randrange(D)
    i = random.randrange(1, 27)
    old = ts[d]
    ts[d] = i
    if max_score < score:
        # print(ts, score)
        max_score = score
    else:
        ts[d] = old

for t in ts:
    print(t)
# print(max_score)
print(sum(input() in "R"*i for i in range(3)))

### FIXED CODE ###

s = input()
if s[0] == s[1] == s[2] == "R":
    print(3)
elif s[0] == s[1] == "R" or s[1] == s[2] == "R":
    print(2)
elif "R" in s:
    print(1)
else:
    print(0)
N, M = map(int, input().split())
oks = [True] * (N+1)
a = [int(input()) for _ in range(M)]
for i in a:
    oks[i] = False
dp = [0] * (N+1)
if oks[1]:
    dp[1] = 1
if oks[2]:
    dp[2] = 2
for i in range(3, N+1):
    if oks[i]:
        dp[i] = int((dp[i-1] + dp[i-2]) % (1e9+7))


print(dp[N])


### FIXED CODE ###

N, M = map(int, input().split())
oks = [True] * (N+1)
a = [int(input()) for _ in range(M)]
for i in a:
    oks[i] = False

dp = [0] * (N+1)
dp[0] = 1
for i in range(N+1):
    for j in range(i+1, min(i+2, N)+1):
        if oks[j]:
            dp[j] += dp[i]
            dp[j] %= int(1e9+7)


print(dp[N])
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            # divisors.append(i)
            if i != n // i and i != (n // i - 1) :
                divisors.append(n//i - 1)
    return divisors

n = int(input())
print(sum(make_divisors(n)))

### FIXED CODE ###

n, k = [int(i) for i in input().split()]
print(n - k + 1)
h,w = map(int,input().split())
lis = [list(map(int,input().split())) for i in ragne(9)]
li = [list(map(int,input().split())) for i in range(h)]

for i in range(9):
    for j in range(9):
        for k in range(9):
            if lis[i][j] > lis[i][k] + lis[k][j]:
                lis[i][j] = lis[i][k] + lis[k][j]
ans = 0
for i in range(h):
    for j in range(w):
        if li[i][j] != -1:
            ans += lis[i][j]
print(ans)

### FIXED CODE ###

h,w = map(int,input().split())
lis = [list(map(int,input().split())) for i in range(10)]
li = [list(map(int,input().split())) for i in range(h)]

for k in range(10):
    for i in range(10):
        for j in range(10):
            if lis[i][j] > lis[i][k] + lis[k][j]:
                lis[i][j] = lis[i][k] + lis[k][j]
ans = 0
for i in range(h):
    for num in li[i]:
        if num >= 0:
            ans += lis[num][1]
print(ans)
a,b,c=map(int,input().split())
print(a if b=c b elif a=c  c else)

### FIXED CODE ###

a,b,c=map(int,input().split())
print(a if b==c else b if a==c else c)
sa = list(input())
sb = list(input())
sc = list(input())

turn = "a"

while True:
    if turn == "a":
        if len(sa) != 0:
            turn = sa.pop(0)
        else:
            print("A")
            exit()
    elif turn == "b":
        if len(sb) != 0:
            turn = sb.pop(0)
        else:
            print("B")
            exit()
    else:
        if len(sc) != "c"
            turn = sc.pop(0)
        else:
            print("C")
            exit()





### FIXED CODE ###

sa = list(input())
sb = list(input())
sc = list(input())

turn = "a"

while True:
    if turn == "a":
        if len(sa) != 0:
            turn = sa.pop(0)
        else:
            print("A")
            exit()
    elif turn == "b":
        if len(sb) != 0:
            turn = sb.pop(0)
        else:
            print("B")
            exit()
    else:
        if len(sc) != 0:
            turn = sc.pop(0)
        else:
            print("C")
            exit()
S = str(input())
T = str(input())

s = len(S)
t = len(T)
for i in range(s-t+1):
  num = s-t-i
  tmp = S[num:num+t]
  flag = True
  for j in range(t):
    if (tmp[j]!='?') and (T[j]!=tmp[j]):
      flag = False
      break
  if flag:
    if 0 < num < s-t:
      ans = S[:num] + T + S[num+t:]
    elif num == 0:
      ans = T + S[num+t:]
    else:
      ans = S[:num] + T
    break
    
if flag:
  ans = ans.replace('?', 'a')
  print(ans)
else:
  print('UNRESTORABLE')

### FIXED CODE ###

S = str(input())
T = str(input())

s = len(S)
t = len(T)
if s < t:
  flag = False
else:
  for i in range(s-t+1):
    num = s-t-i
    tmp = S[num:num+t]
    flag = True
    for j in range(t):
      if (tmp[j]!='?') and (T[j]!=tmp[j]):
        flag = False
        break
    if flag:
      if 0 < num < s-t:
        ans = S[:num] + T + S[num+t:]
      elif num == 0:
        ans = T + S[num+t:]
      else:
        ans = S[:num] + T
      break
    
if flag:
  ans = ans.replace('?', 'a')
  print(ans)
else:
  print('UNRESTORABLE')
S = list(input())
K = int(input())

ans = 0

if S[0] == S[-1]:
    if S[-2] == S[-1]:
        ans = K
        S[-1] = -1
    else:
        ans = K - 1
        S[-1] = -1

j = 0
like = []

for i in range(len(S) - 1):
    if S[i] == S[i + 1]:
        if len(like) == j:
            like.append(2)
        else:
            like[j] += 1
    else:
        like.append(1)
        j += 1

for l in like:
    ans += l // 2 * K

print(ans)

### FIXED CODE ###

def INT():
    return int(input())

def MI():
    return map(int, input().split())

def LI():
    return list(map(int, input().split()))

def l_s(L):
    return "".join(map(str, L))

import sys
from itertools import groupby as gb

S = input()
K = INT()
g1 = []

if len(set(S)) == 1:
    print(len(S) * K // 2)
    sys.exit()

for _, s in gb(S):
    g1.append(list(s))

tmp = l_s(g1[0]) + l_s(g1[len(g1) - 1])
g2 = []

for _, s in gb(tmp):
    g2.append(list(s))
    
ans = len(g1[0]) // 2 + len(g1[len(g1) - 1]) // 2

for i in range(1, len(g1) - 1):
    ans += (len(g1[i]) // 2) * K

for i in range(len(g2)):
    ans += (len(g2[i]) // 2) * (K - 1)
    
print(ans)
a=list(input())
b=a[0]
c=a[1]
d=a[2]
e=c/b
if e>d:
  print(d)
elif d>e:
  print(e)


### FIXED CODE ###

a=list(input().split())
b=int(a[0])
c=int(a[1])
d=int(a[2])
e=int(c/b)
if e>=d:
  print(d)
elif d>e:
  print(e)
import sys
sys.setrecursionlimit(10000)

s = list(input())
n = len(s)-1
ans = 0

def rec(plus):
  if len(plus) == n:
    global ans
    si = s[0]
    for i in range(n):
      if plus[i] == '-':
        si += s[i+1]
      else:
        ans = ans + int(si)
        si = s[i+1]
    ans = ans + int(si)
  else:
    rec(plus+'-')
    rec(plus+'+')

rec('-')
rec('+')
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(2000)

s = list(input())
n = len(s)-1
ans = 0

def rec(plus):
  if len(plus) == n:
    global ans
    si = s[0]
    for i in range(n):
      if plus[i] == '-':
        si += s[i+1]
      else:
        ans = ans + int(si)
        si = s[i+1]
    ans = ans + int(si)
  else:
    rec(plus+'-')
    rec(plus+'+')

if n == 0:
  print(1)
else:
  rec('-')
  rec('+')
  print(ans)
li = [int(input()) for _ in range(5)]

temp = 10
for i in range(5):
    if li[i]%10 != 0 and li[i]%10 < temp:
        temp = li[i]%10
        s = i
else:
    t = li.pop(s)
    
ans = 0

for i in li:
    if i%10 == 0:
        ans += i//10
    else:
        ans += 1 + i//10
        
print(ans * 10 + t)

### FIXED CODE ###

li = [int(input()) for _ in range(5)]
 
s = 0
temp = 10
for i in range(5):
    if li[i]%10 != 0 and li[i]%10 < temp:
        temp = li[i]%10
        s = i
else:
    t = li.pop(s)
    
ans = 0

for i in li:
    if i%10 == 0:
        ans += i//10
    else:
        ans += 1 + i//10
        
print(ans * 10 + t)
a, b, c = map(int, input().split())
j = 0
while i in range(a, b + 1)
    if c % i == 0:
        j += 1
print (j)



### FIXED CODE ###

a, b, c = map(int, input().split())
j = 0
for i in range(a, b + 1):
    if c % i == 0:
        j += 1
print (j)
n = int(input())
x = list(map(int,input().split()))

mod = 10**9 + 7

l = []
for i in range(n-1):
    d = x[i+1] - x[i]
    l.append(d)

# print(l)

import math
f = math.factorial(n-1)

count = 0

for i in range(1,n):
    k = f * 1/i * (n-i) 
    plus = l[i-1] * k
    count += plus

print(int(count)%mod)

### FIXED CODE ###

import math

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

mod = 10**9 + 7

f = math.factorial(n-1)
f %= mod

def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

l = []
for i in range(n-1):
    d = x[i+1] - x[i]
    l.append(d)

# print(l)

count = 0
k = f
plus = 0
for i in range(1,n):
    # print(k)
    k = f + plus
    count += l[i-1] * k
    plus += f * modinv(i+1,mod)

print(int(count)%mod)
S = input()
l = [int(n) for n in list(S)]
a = [0,int(S)%2019]
init = 0
for i in range(len(S)-1):
    S = S[1:]
    a.append(int(S)%2019)
b = [kv*(kv-1)//2 for kv in Counter(a).values() if kv > 1]
print(sum(b))

### FIXED CODE ###

from collections import Counter,deque
from scipy import special
S = input()
l = [int(n) for n in S]
a = [0]
t = 0
m = 1
d = deque(l)
mod = 2019
while d:
    temp = d.pop()
    t = (t + (temp * m)) % mod
    m = (m * 10) % mod
    a.append(t%mod)
b = [special.comb(kv,2,exact=True) for kv in Counter(a).values() if kv > 1]
print(sum(b))
a,b,c=(input() for _ in range(2))
print(a[0]+b[1]+c[2])


### FIXED CODE ###

a,b,c=(input() for _ in range(3))
print(a[0]+b[1]+c[2])