Harryxun/stf_run huggingface dataset:
A=int(input())
B=int(input())
C=B//(A-1)
if B%(A-1)!=0:
    print(C+1)
else:
    print(C)

### FIXED CODE ###

import math
A,B=map(int, input().split())
if A<B:
  k=math.ceil((B-A)/(A-1))+1
  print(k)
elif B==1:
  print(0)
else:
  print(1)
n, m = map(int, raw_input().split())
c = map(int, raw_input().split())

t = [float('inf') for i in range(n+1)]
t[0] = 0

for i in range(n+1):
    if c[i] > n:
        break
    else:
        for j in range(c[i], n+1):
            t[j] = min([t[j], t[j-c[i]]+1])
print t[n]

### FIXED CODE ###

n, m = map(int, raw_input().split())
c = map(int, raw_input().split())

t = [float('inf') for i in range(n+1)]
t[0] = 0

for i in range(m):
    if c[i] > n:
        break
    else:
        for j in range(c[i], n+1):
            t[j] = min([t[j], t[j-c[i]]+1])
print t[n]
A,B = map(int, input().split())
print('Possible' if 0 in (A % 3 or B % 3 or (A + B) % 3) else 'Impossible')

### FIXED CODE ###

A,B = map(int, input().split())
print('Possible' if (A % 3 == 0) or (B % 3 == 0) or ((A + B) % 3 == 0) else 'Impossible')
from math import floor
A,B,N = map(int,input().split())
if(B-1>N):
    Nomin = floor(N)
else:
    Nomin = floor(B-1)

print(Nomin)

### FIXED CODE ###

K =int(input())
A,B = map(int,input().split())
f = 0
for i in range(A,B+1):

    if(i%K==0):
        print("OK")
        f =1
        break

if(f ==0):
    print("NG")
from collections import deque

def bfs():
    global ans
    que = deque([])
    for i in range(h):
        for j in range(w):
           if A[i][j] == "#":
               que.append((i, j))
               d[i][j] = 0
               
    white = True
    while white == True:
        dx = [1, 0, -1, 0]
        dy = [0, 1, 0, -1]
        for k in range(len(que)):
            i = 0
            while i < 4: 
                nx = que[k][0] + dx[i]
                ny = que[k][1] + dy[i]
                if 0 <= nx < w and 0 <= ny < h and A[nx][ny] != "#" and d[nx][ny] == float("inf"):
                    d[nx][ny] = d[que[k][0]][que[k][1]] + 1
                    A[nx][ny] = "#"
                i += 1
        que = deque([])
        black = 0
        for i in range(h):
            for j in range(w):
              if A[i][j] == "#":
                  que.append((i, j))
                  black += 1
                  ans = max(ans, d[i][j])
        if black == h * w:
            white = False
      
        


h, w = map(int, input().split())
A = [list(input()) for _ in range(h)]
d = [[float("inf")] * w for _ in range(h)]
ans = 0
bfs()

print(ans)

### FIXED CODE ###

from subprocess import call
call (('pypy3', '-c', """
from collections import deque

def main():
    h, w = map(int, input().split())
    A = [list(input()) for _ in range(h)]
    d = [[10**9] * w for _ in range(h)]
    que = deque([])
    
    for i in range(h):
        for j in range(w):
           if A[i][j] == "#":
               que.append([i, j])
               d[i][j] = 0
           else:
               d[i][j] = 10 ** 9
            
    while que:
        x, y = que.popleft()
        dx = [1, 0, -1, 0]
        dy = [0, 1, 0, -1]
        for i in range(4): 
            nx = x + dx[i]
            ny = y + dy[i]
            if 0 <= nx < h and 0 <= ny < w and d[nx][ny] == 10**9:
                d[nx][ny] = d[x][y] + 1
                que.append([nx, ny])
    ans = 0
    for i in range(h):
        for j in range(w):
            ans = max(ans, d[i][j])
    print(ans)
    
    return
    
main()

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

ans = 0
even = [a % 2 == 0 for a in A]
for i in range(2 ** N):
    tmp = even.copy()
    cnt = 0
    for j in range(N):
        if ((i >> j) & 1):
            tmp[j] = not tmp[j]
            cnt += 1
    if sum(tmp) > 0:
        ans += 2 ** cnt if i != 0 else 1

print(ans)


### FIXED CODE ###

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

ans = 0
even = [a % 2 == 0 for a in A]
for i in range(2 ** N):
    tmp = even.copy()
    cnt = 0
    for j in range(N):
        if ((i >> j) & 1):
            tmp[j] = not tmp[j]
            cnt += 1
    if sum(tmp) > 0:
        ans += 2 ** cnt if i != 0 else 1

print(ans)
N=int(input())
lsr=[]
for i in range(1,9):
    for j in range(1,9):
        lst.append(i*j)

print("Yes" if N in lst else "No")
        

### FIXED CODE ###

N=int(input())
lst=[]
for i in range(1,10):
    for j in range(1,10):
        lst.append(i*j)

if N in lst:
    print("Yes")
else:
    print("No")
n,k=map(int,input().split())
p=list(map(int,input().split()))
f=lambda x:0.5*(x+1)
pp=list(map(f,p))
t=[0]*(n+1)
for i in range(n):
    t[i+1]=t[i]+pp[i]

for i in range(n-k+1):
    ans=max(ans,t[i+k]-t[i])
print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
p=list(map(int,input().split()))
f=lambda x:0.5*(x+1)
pp=list(map(f,p))
t=[0]*(n+1)
for i in range(n):
    t[i+1]=t[i]+pp[i]
ans=0
for i in range(n-k+1):
    ans=max(ans,t[i+k]-t[i])
print(ans)
n, a, b = map(int, input().split())
if (n + b) % 2 == 0:
  print("Alice")
elif (n + b) % 2 != 0:
  print("Bor

### FIXED CODE ###

n, a, b = map(int, input().split())
if (a - b) % 2 == 0:
  print("Alice")
else:
  print("Borys")
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
for i in range(K):
  H.remove(H[i])
print(K+sum(H[K::]))


### FIXED CODE ###

N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
print(sum(H[K:]))
import math

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

if N == 1:
    print(P)

T = int(math.pow(P, 1/N))

if T <= 1:
    print(1)

Q = [True] * (T + 1)
F = []

Q[0] = False
Q[1] = False

for n in range(2, T + 1):
    if Q[n]:
        F.append(n)
        for m in range(n, T + 1, n):
            Q[m] = False
D = 1
for f in F:
    c = 0
    while P % f == 0:
        c += 1
        P //= f
    D *= f ** (c // N)

print(D)

### FIXED CODE ###

import math

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

if N == 1:
    print(P)
    
else:
    T = int(math.pow(P, 1/N)) * 2

    Q = [False, False] + [True] * T
    F = []
    for n in range(T + 1):
        if Q[n]:
            F.append(n)
            for m in range(n, T + 1, n):
                Q[m] = False
    D = 1
    for f in F:
        c = 0
        while P % f == 0:
            c += 1
            P //= f
        D *= f ** (c // N)

    print(D)
"""
fast way to compute a combination using inverse factorials
O(N) to construct tables -> O(1) to compute each combination
"""
from typing import List, Tuple


def get_fact(lim: int) -> List[int]:
    """Compute a table of factorials (1-indexed)."""
    fact = [1] * (lim + 1)
    x = 1
    for i in range(1, lim + 1):
        x = (x * i) % MOD
        fact[i] = x
    return fact


def get_inv(lim: int) -> List[int]:
    """Compute a table of inverse factorials (1-indexed)."""
    inv = [1] * (lim + 1)
    inv[lim] = pow(fact[lim], MOD - 2, MOD)
    x = inv[lim]
    for i in range(lim - 1, 0, -1):
        x = (x * (i + 1)) % MOD
        inv[i] = x
    return inv


def get_fact_and_inv(lim: int) -> Tuple[List[int], List[int]]:
    """Compute tables of factorials and inverse factorials (1-indexed)."""
    fact = [0] * (lim + 1)
    fact[0] = 1
    x = 1
    for i in range(1, lim + 1):
        x = (x * i) % MOD
        fact[i] = x

    inv = [1] * (lim + 1)
    inv[-1] = pow(fact[-1], MOD - 2, MOD)
    x = inv[-1]
    for i in range(lim - 1, 0, -1):
        x = (x * (i + 1)) % MOD
        inv[i] = x
    return fact, inv


def comb(n: int, r: int) -> int:
    """Compute nCr (n! / r!(n - r)!)."""
    return fact[n] * inv[r] * inv[n - r]


# e.g. ARC058D - いろはちゃんとマス目 / Iroha and a Grid (ABC042D)
def main():
    global MOD, fact, inv
    H, W, A, B = tuple(map(int, input().split()))
    MOD = 10 ** 9 + 7
    fact = get_fact(H + W)
    inv = get_inv(H + W)
    x, y, a = H - A - 1, W + A - 2, A - 1  # fixed variables
    ans = sum(comb(x + i, i) * comb(y - i, a) for i in range(B, W)) % MOD
    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

# ARC058D - いろはちゃんとマス目 / Iroha and a Grid (ABC042D)
def comb(n: int, r: int) -> int:
    return fact[n] * inv[n - r] * inv[r]


def main():
    global fact, inv
    H, W, A, B = tuple(map(int, input().split()))
    MOD = 10 ** 9 + 7
    # table of factorials
    fact, x = [1] * (H + W + 1), 1
    for i in range(1, H + W + 1):
        x = (x * i) % MOD
        fact[i] = x
    # table of inverse factorials
    inv = [1] * (H + W + 1)
    inv[-1] = pow(fact[-1], MOD - 2, MOD)
    x = inv[-1]
    for i in range(H + W - 1, 0, -1):
        x = (x * (i + 1)) % MOD
        inv[i] = x

    ans = 0
    for i in range(B, W):
        ans += comb(i + H - A - 1, i) * comb(W - i - 1 + A - 1, A - 1)
    print(ans % MOD)


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

digits = 1
base = 10
for i in range(0, 20):
    if n < 10 ** i:
        digits = i
        break

smallest_digit = n % 10
largest_digit = n // (10 ** (digits - 1)) % 10
mid_digit_pattern = (n - largest_digit * (10 ** (digits - 1))) // 10 + 1

def count_pattern(a, b, dig):
    if dig == 1 and a != b:
        return 0
    elif dig == 1:
        return 1
    elif dig == digits:
        if a > largest_digit:
            return 0
        elif a < largest_digit:
            return 10 ** (dig - 2)
        elif b <= smallest_digit:
            return mid_digit_pattern
        elif b > smallest_digit:
            return mid_digit_pattern - 1
        else:
            assert False, "Can't reach here"
    else:
        return 10 ** (dig - 2)

result = 0
if digits == 1:
    result = n
else:
    counts = {}
    for i in range(1, 10):
        for j in range(1, 10):
            state = (i, j)
            counts[state] = sum([count_pattern(*state, d) for d in range(1, digits + 1)])

    for state in counts.keys():
        result += counts[state] * counts[tuple(reversed(state))]

print(result)


### FIXED CODE ###

n = int(input())

digits = 1
base = 10
for i in range(0, 20):
    if n < 10 ** i:
        digits = i
        break

smallest_digit = n % 10
largest_digit = n // (10 ** (digits - 1)) % 10
mid_digit_pattern = (n - largest_digit * (10 ** (digits - 1))) // 10 + 1

def count_pattern(a, b, dig):
    if dig == 1 and a != b:
        return 0
    elif dig == 1:
        return 1
    elif dig == digits:
        if a > largest_digit:
            return 0
        elif a < largest_digit:
            return 10 ** (dig - 2)
        elif b <= smallest_digit:
            return mid_digit_pattern
        elif b > smallest_digit:
            return mid_digit_pattern - 1
        else:
            assert False, "Can't reach here"
    else:
        return 10 ** (dig - 2)

result = 0
if digits == 1:
    result = n
else:
    counts = {}
    for i in range(1, 10):
        for j in range(1, 10):
            state = (i, j)
            counts[state] = sum([count_pattern(i, j, d) for d in range(1, digits + 1)])

    for state in counts.keys():
        result += counts[state] * counts[tuple(reversed(state))]

print(result)
def main():
    from itertools import accumulate
    n, c, *stc = map(int, open(0).read().split())
    table = [0] * (10 ** 5 + 2)
    m = list(zip(stc[::3], stc[1::3], stc[2::3]))
    m = sorted(key=lambda a: (a[2], a[0], a[1]))

    ch_ = 0
    t_ = 0
    for s, t, ch in m:
        if ch != ch_:
            ch_ = ch
            t_ = 0
        if t_ == s:
            table[t_ + 1] += 1
        else:
            table[s] += 1

        table[t + 1] -= 1
        t_ = t

    *x, = accumulate(table)
    ans = max(x)

    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    from itertools import accumulate
    n, c, *stc = map(int, open(0).read().split())
    table = [0] * 2 * (10 ** 5 + 1)
    m = list(zip(stc[::3], stc[1::3], stc[2::3]))
    m.sort(key=lambda a: (a[2], a[0], a[1]))

    ch_ = 0
    t_ = 0
    for s, t, ch in m:
        if ch != ch_:
            ch_ = ch
            t_ = 0
        if t_ == 2 * s:
            table[t_ + 1] += 1
        else:
            table[2 * s - 1] += 1

        table[2 * t + 1] -= 1
        t_ = 2 * t

    *x, = accumulate(table)
    ans = max(x)

    print(ans)


if __name__ == '__main__':
    main()
n = int(input())
    d,x = map(int, input().split())
    sum = 0
    for i in range(n):
        a = int(input())
        for j in range(100):
            day = 1 + j*a
            if day <= d:
                sum += 1
            else:
                break
    print(x + sum)

### FIXED CODE ###

n = int(input())
d,x = map(int, input().split())
sum = 0
for i in range(n):
    a = int(input())
    for j in range(100):
        day = 1 + j*a
        if day <= d:
            sum += 1
        else:
            break
print(x + sum)
a=int(input())
if a<1500:
	print("ABC")
else if a<2800:
	print("ARC")
else:
  print("AGC")

### FIXED CODE ###

a=int(input())
if a<1200:
	print("ABC")
elif a<2800:
	print("ARC")
else:
	print("AGC")
import math

n = int(input())

a = [0]*n

for x in range(1, int(math.sqrt(n))+1):
    for y in range(1, x+1):
        for z in range(1, y+1):
            t = x**2+y**2+z**2+x*y+y*z+z*x-1
            if t >= n:
                break
            if ((x==y)and(y!=z))or((x==z)and(y!=x))or((y==z)and(x!=z)):
                a[t] = 3
            elif (x!=y)and(y!=z)and(x!=z):
                a[t] = 6
            else:
                a[t] = 1

for i in range(n):
    print(a[i])


### FIXED CODE ###

l, r, d = map(int, input().split())

ans = int(r/d)-int((l-1)/d)
print(ans)
s,t=input().split()
a,b=map(int,input().split())
u=input()
if s==u:
  print(s-1 t)
else:
  print(s t-1)

### FIXED CODE ###

s,t=input().split()
a,b=map(int,input().split())
u=input()
if s==u:
  print(a-1,b)
else:
  print(a,b-1)
import bisect
A,B,Q = map(int,f.readline().split())
S = [int(input()) for _ in range(A)]
T = [int(input()) for _ in range(B)]
for _ in range(Q):
    x = int(input())
    indS = bisect.bisect_right(S,x)
    indT = bisect.bisect_right(T,x)
    if indS==0 and indT==0:
        print(max(S[0],T[0])-x)
    elif indS==0 and indT>0:
        if indT<len(T) and T[indT]<S[indS]:
            print(S[0]-x)
        elif indT<len(T) and T[indT]>S[indS]:
            r1 = T[indT]-x
            r2 = 2*(x-T[indT-1])+S[indS]-x
            r3 = x-T[ind-1]+2*(S[indS]-x)
            print(min(r1,r2,r3))
        elif indT==len(T):
            r1 = 2*(x-T[indT-1])+S[indS]-x
            r2 = x-T[indT-1]+2*(S[indS]-x)
            print(min(r1,r2))
    elif indT==0 and indS>0:
        if indS<len(S) and S[indS]<T[indT]:
            print(T[0]-x)
        elif indS<len(S) and S[indS]>T[indT]:
            r1 = S[indS]-x
            r2 = 2*(x-S[indS-1])+T[indT]-x
            r3 = x-S[indS-1]+2*(T[indT]-x)
            print(min(r1,r2,r3))
        elif indS==len(S):
            r1 = 2*(x-S[indS-1])+T[indT]-x
            r2 = x-S[indS-1]+2*(T[indT]-x)
            print(min(r1,r2))
    elif indS==len(S) and indT==len(T):
        print(x-min(S[-1],T[-1]))
    elif indS==len(S) and indT<len(T):
        if indT==0:
            r1 = 2*(x-S[-1])+T[0]-x
            r2 = x-S[-1]+2*(T[0]-x)
            print(min(r1,r2))
        elif indT>0:
            if T[indT-1]>S[-1]:
                print(x-S[-1])
            elif T[indT-1]<S[-1]:
                r1 = 2*(T[indT]-x)+x-S[-1]
                r3 = T[indT]-x+2*(x-S[-1])
                r2 = x-T[indT-1]
                print(min(r1,r2,r3))
    elif indS<len(S) and indT==len(T):
        if indS==0:
            r1 = 2*(x-T[-1])+S[0]-x
            r2 = x-T[-1]+2*(S[0]-x)
            print(min(r1,r2))
        elif indT>0:
            if S[indS-1]>T[-1]:
                print(x-T[-1])
            elif S[indS-1]<T[-1]:
                r1 = 2*(S[indS]-x)+x-T[-1]
                r3 = S[indS]-x+2*(x-T[-1])
                r2 = x-S[indt-1]
                print(min(r1,r2,r3))
    else:
        r1 = max(S[indS],T[indT])-x
        r2 = x-min(S[indS-1],T[indT-1])
        r3 = 2*(S[indS]-x)+x-T[indT-1]
        r4 = S[indS]-x+2*(x-T[indT-1])
        r5 = 2*(x-S[indS-1])+T[indT]-x
        r6 = x-S[indS-1]+2*(T[indT]-x)
        print(min(r1,r2,r3,r4,r5,r6))

### FIXED CODE ###

from bisect import bisect_right
A,B,Q = map(int,input().split())
S = [int(input()) for _ in range(A)]
S.append(10**11)
S.insert(0,-10**11)
T = [int(input()) for _ in range(B)]
T.append(10**11)
T.insert(0,-10**11)
Ds = {i:0 for i in range(1,A+1)}
Ds[A+1] = 10**11
Ds[0] = 10**11
for i in range(1,A+1):
    ind = bisect_right(T,S[i])
    Ds[i] = min(T[ind]-S[i],S[i]-T[ind-1])
Dt = {j:0 for j in range(1,B+1)}
Dt[B+1] = 10**11
Dt[0] = 10**11
for j in range(1,B+1):
    ind = bisect_right(S,T[j])
    Dt[j] = min(S[ind]-T[j],T[j]-S[ind-1])
for _ in range(Q):
    x = int(input())
    inds = bisect_right(S,x)
    cnts = min(S[inds]-x+Ds[inds],x-S[inds-1]+Ds[inds-1])
    indt = bisect_right(T,x)
    cntt = min(T[indt]-x+Dt[indt],x-T[indt-1]+Dt[indt-1])
    print(min(cnts,cntt))
K, N = map(int, input().split())

house_list = list(map(int, input().split()))
#print(house_list)


if 0 in house_list:
    print(min(house_list[-1] - house_list[1], house_list[-1] - house_list[0]))
else:
    print(min(house_list[-1] - house_list[0]))

### FIXED CODE ###

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

house_list = list(map(int, input().split()))
#print(house_list)

dist_list = [K - house_list[-1] + house_list[0]]
#print(dist_list)

for n in range(1, N):
    dist_list.append(house_list[n] - house_list[n-1])
print(K - max(dist_list))
from collections import Counter
n=int(input())
lst=[]
for i in range(n):
  X,Y=map(int,input().split())
  lst.append([X,Y])
lst_2=sorted(lst,key=lambda x: x[0])
z=[]
if n==1:
  print(1)
else:
  for j in range(n):
    for k in range(j+1,n):
      z.append((lst_2[j][0]-lst_2[k][0],lst_2[j][1]-lst_2[k][1]))
Z=Counter(z)
m=Z.most_common()[0][1]
print(n-m)


    
    
    


### FIXED CODE ###

from collections import Counter
import sys
n=int(input())
lst=[]
for i in range(n):
  X,Y=map(int,input().split())
  lst.append([X,Y])
lst_2=sorted(lst,key=lambda x: x[0])
lst_3=sorted(lst,key=lambda x: x[1])
z=[]
if n==1:
  print(1)
  sys.exit()
else:
  for j in range(n):
    for k in range(j+1,n):
      z.append((lst_2[j][0]-lst_2[k][0],lst_2[j][1]-lst_2[k][1]))
u=[]
if n==1:
  print(1)
  sys.exit()
else:
  for j in range(n):
    for k in range(j+1,n):
      u.append((lst_3[j][0]-lst_3[k][0],lst_3[j][1]-lst_3[k][1]))
Z=Counter(z)
U=Counter(u)
m=max(Z.most_common()[0][1],U.most_common()[0][1])
print(n-m)
n,k = map(int,input().split())
s = list(input())

l = 0
r = 0
count = 0
hcount = 0
score = 0
def sccount(s):
    l = 0
    r = 0
    count = 0
    score = 0
    for i in range(n):
        if s[i] == 'R':
            if r == 1:
                score += 1
            l = 0
            r = 1
        else:
            if l == 1:
                score += 1
            l = 1
            r = 0
    l = 0
    r = 0
    return score

if s[0] == 'L':
    for i in range(n):
        if s[i] == 'L':
            if r == 1 :
                count += 1
            l = 1
            r = 0
        else:
            l = 0
            r = 1
    if s[-1] == 'R':
        hcount = 1
else:
    for i in range(n):
        if s[i] == 'R':
            if l == 1 :
                count += 1
            l = 0
            r = 1
        else:
            l = 1
            r = 0
    if s[-1] == 'L':
        hcount = 1
score = sccount(s)
if count >= k:
    ans = score + k*2
elif count < k:
    ans = score + count*2 + hcount
print(ans)
# print(score,count,hcount)


### FIXED CODE ###

n = int(input())
print(n**3)
x,a,b=map(int,input.split())
if x-a>x-b:
  print('B')
else:
  print('A')

### FIXED CODE ###

x,a,b=map(int,input().split())
if abs(x-a)>abs(x-b):
  print('B')
else:
  print('A')
N = int(input())
C = list(input())

flag_left = 0
flag_right = N-1
counter = 0


while flag_left<flag_right:
    while C[flag_left]=="R":
        flag_left += 1
        if flag_left>N-1:
            break
    while C[flag_right]=="W":
        flag_right -= 1
        if flag_left<0:
            break
        
    if flag_left<flag_right:
        counter += 1
    flag_left += 1
    flag_right -= 1
print(counter)

### FIXED CODE ###

N = int(input())
C = input()

flag_left = 0
flag_right = N-1
counter = 0

ok = max(C.count("W"),C.count("R"))
if ok ==N:
    print(0)
    exit()

while flag_left<flag_right:
    while C[flag_left]=="R":
        flag_left += 1
        if flag_left>N-1:
            break
    while C[flag_right]=="W":
        flag_right -= 1
        if flag_left<0:
            break
        
    if flag_left<flag_right:
        counter += 1
    flag_left += 1
    flag_right -= 1
print(counter)
s = 0
for i in range(2):
    if A > B:
        s += A
        A -= 1
    elif B > A:
        s += B
        B -= 1
    elif A == B:
        s += A
        A -= 1
print(s)

### FIXED CODE ###

n, m=[int(k) for k in input().split()]
cont=0
for i in range(2):
    if n>m: 
        cont+=n
        n-=1
    elif m>=n:
        cont+=m
        m-=1
print(cont)
n, k = map(int, input().split())
a = [int(x) for x in input().split()]
while True:
    s = str(n)
    poss = False
    for i in s:
        if int(i) in a:
            poss = True
            break
    if not poss:
        print(n)
        exit(0)
    n += 1

### FIXED CODE ###

a,b,c = map(int, input().split())
if a*b*c==5*5*7:
    print("YES")
else:
    print("NO")
def main():
    N,T= (int(i) for i in input().split())
    A=[]
    B=[]
    
    for i in range(N):
        ai,bi= (int(j) for j in input().split())  
        A.append(ai)
        B.append(bi)

    if (min(A)) <= T:
        print(min((A))
    else:
        print("TLE")
    
          
main()

### FIXED CODE ###

def main():
    N,T= (int(i) for i in input().split())
    a_min=1001

    for i in range(N):
        ai,bi= (int(j) for j in input().split())  
        if bi<= T:
            if ai <= a_min:
                a_min = ai

    if a_min==1001:
        print("TLE")
    else:
        print(a_min)
          
     
main()
hs = []
for i in xrange(11):
    hs.append(int(raw_input()))

hs.sort()

print hs[9]
print hs[8]
print hs[7]

### FIXED CODE ###

hs = []
for i in xrange(10):
    hs.append(int(raw_input()))

hs.sort()

print hs[9]
print hs[8]
print hs[7]
p=map(int,input().split());print('Yes'if p[0]<=p[2]<=p[1]else'No')

### FIXED CODE ###

p=list(map(int,input().split()));print('Yes' if p[0]<=p[2]<=p[1] else 'No')
x,n = map(int,input().split())
if n == 0:
  ans = x
else:
  p = [int(i.strip()) for i in input().split()]
  for i in range(n):
    ch_1 = x-i
    ch_2 = x+i
    if p.count(ch_1) == 0:
      ans = ch_1
      break
    elif p.count(ch_2) == 0:
      ans = ch_2
      break
    else:
      ans = x
print(p)

### FIXED CODE ###

x,n = map(int,input().split())
if n == 0:
  ans = x
else:
  p = [int(i.strip()) for i in input().split()]
  for i in range(n+1):
    ch_1 = x-i
    ch_2 = x+i
    if p.count(ch_1) == 0:
      ans = ch_1
      break
    elif p.count(ch_2) == 0:
      ans = ch_2
      break
print(ans)
N = input()

print(N**3)

### FIXED CODE ###

N = int(input())
print(N**3)
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n = int(input())

def bs(ok, ng, cond):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if cond(mid):
            ok = mid
        else:
            ng = mid
    return mid

ans = bs(n, 0, lambda x: (x * 1.08) >= n)
if int(ans * 1.08) == n:
    print(ans)
else:
    print(':(')


### FIXED CODE ###

n = int(input())

import math

def cal():
    for i in range(n+1):
        if n == math.floor(i * 1.08):
            return i
    return 0

ans = cal()
if ans:
    print(ans)
else:
    print(':(')
def solve(m_list):
    m_val = m_list[0]
    for i in m_list:
        m_val = min(m_val,gcd(min_val,m))
    return min_val

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

def main():
    n = int(input())
    m_list = list(map(int,input().split()))

    ans = solve(m_list)
    print(ans)

if __name__ == '__main__':
    main()

### FIXED CODE ###

A, B = map(int,input().split())

if B % A == 0:
    print(A+B)
else:
    print(B-A)