Harryxun/stf_run huggingface dataset:
lis1 = []
lis2 = []
lis3 = []
count = 0
for num in input().split():
    lis1.append(int(num))
for num in input().split():
    lis2.append(int(num))
for num in input().split():
    lis3.append(int(num))
for a1 in range(101):
    for a2 in range(101):
        for a3 in range(101):
            count = 0
            if lis1[0] - a1 == lis2[0] – a1 == lis3[0] - a1:
                count += 1
            if lis1[1] - a2 == lis2[1] - a2 == lis3[1] - a2:
                count += 1
            if lis1[2] - a3 == lis2[2] - a3 == lis3[2] - a3:
                count += 1
            if count == 3:
                print("Yes")
                break
print("No")

### FIXED CODE ###

lis1 = []
lis2 = []
lis3 = []
count = 0
for num in input().split():
    lis1.append(int(num))
for num in input().split():
    lis2.append(int(num))
for num in input().split():
    lis3.append(int(num))
if lis1[0]-lis2[0]==lis1[1]-lis2[1]==lis1[2]-lis2[2]:
    count += 1
if lis1[0]-lis3[0]==lis1[1]-lis3[1]==lis1[2]-lis3[2]:
    count += 1
if lis1[0]-lis1[1]==lis2[0]-lis2[1]==lis3[0]-lis3[1]:
    count += 1
if lis1[0]-lis1[2]==lis2[0]-lis2[2]==lis3[0]-lis3[2]:
    count += 1
if count == 4:
    print("Yes")
else:
    print("No")
mod=10**9+7
N=int(input())
C=[0]
C.extend(sorted(list(map(int,input().split())),reverse=True)) # 1-indexed

# print(C)

ans=0
for j in range(1,N+1):
    tmp=C[j]*(j+1)*int(pow(2,N-2,mod))%mod
    # print(tmp)
    ans=(ans+tmp)%mod
    # print(j,ans)
ans=ans*int(pow(2,N,mod))%mod

print(ans)

### FIXED CODE ###

# inverse x^(-1)
def inv(x):
    global mod
    return pow(x,mod-2,mod)

mod=10**9+7
N = int(input())
C = [0]
C.extend(sorted(list(map(int,input().split())), reverse=True)) # 1-indexed, 降順

# print(C)
# C[i]が最後からj番目に操作される（コストが C[i]*j 掛かる）のは，c[1]~C[i-1]にj-1個操作すべきもの，すなわち，C[i]以上のものがあるとき。
# C[i+1]~C[N]の選び方は自由。
# ⇒ combi(i-1, j-1)*2**(N-i) を掛ける。
# 総和を計算すると，結局，2**N * Σ[i=1->N](2**(N-i)*Ci*(2**(i-2)*(i-1) + 2**(i-1))) になる

pow2 = [1]
for k in range(1, N+1):    
    pow2.append(pow2[-1] * 2 % mod)

# print(pow2)

ans=0
for i in range(1, N+1):
    temp = pow2[N - i] * C[i] * ((0 if i == 1 else (pow2[i - 2] * (i - 1))) + pow2[i - 1]) % mod
    ans = (ans + temp) % mod

ans = ans * pow2[N] % mod

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

def get_divisors(n):
    from math import ceil
    divisors = []
    for num in range(ceil(n**0.5), n+1):
        if n % num == 0:
            divisors.append(n//num)
            if n//num != n:
                divisors.append(num)
    divisors.sort(reverse=True)
    return divisors

total = sum(A)
divisors = get_divisors(total)
ans = -1
for d in divisors:
    R = [a%d for a in A]
    R.sort(reverse=True)
    pr = 0
    nr = -sum(R)
    for i, r in enumerate(R):
        pr += d-r
        nr += r
        if nr+pr >= 0:
            if pr <= K and nr+pr == 0:
                ans = d
            break
    if ans != -1:
        print(ans)
        break
else:
    print(1)


### FIXED CODE ###

S = input()
N = len(S)
cells = [0]*N

seq = 0
for i, s in enumerate(S):
    if s == 'R':
        seq += 1
        cells[i] = seq
        continue
    seq = 0

rev_S = S[::-1]
seq = 0
for i, s in enumerate(rev_S):
    if s == 'L':
        seq += 1
        cells[N-1-i] = seq
        continue
    seq = 0

ans = [0]*N
pre_cell = 0
pre_s = 'R'
l_flag =False
for i, s in enumerate(S):
    cell = cells[i]
    if pre_s == 'R' and s == 'L':
        ans[i] = cell//2 + cell%2 + pre_cell//2
        ans[i-1] = pre_cell//2 + pre_cell % 2 + cell//2
    pre_s = s
    pre_cell = cell

ans_str = ""
for a in ans:
    ans_str += str(a)+" "
print(ans_str)
from itertools import combinations
import math


def solve():
    l, r = map(int, input().split())
    a = 2018
    for i, j in combinations(range(l, r + 1), 2):
        amari = (i * j) % 2019
        if amari == 0:
            return 0
        elif amari < a:
            a = amari
    return a


if __name__ == "__main__":
    print(solve())


### FIXED CODE ###

from itertools import combinations
import math


def solve():
    l, r = map(int, input().split())
    a = 2018
    for i in range(l, r):
        for j in range(i + 1, r + 1):
            amari = (i * j) % 2019
            if amari == 0:
                return 0
            elif amari < a:
                a = amari
    return a


if __name__ == "__main__":
    print(solve())
X,N = map(int,input().split())
P = list(map(int,input().split()))

P_n = [i for i in range(1,101,1) if i not in P]
abs_value = [abs(X-P_n[j]) for j in range(len(P_n))]
min_abs = min(abs_value)

import sys

for k in range(len(P_n)):
    if abs_value[k] == min_abs:
        print(P_n[k])
        sys.exit()

### FIXED CODE ###

X, N = map(int, input().split())
 
p = list(map(int, input().split()))
 
p_none = [i for i in range(110) if i not in p]
p_none_sa = [abs(p_none[i]-X) for i in range(len(p_none))]
 
import sys
 
min_p_none = min(p_none_sa)
for i in range(len(p_none_sa)):
    if p_none_sa[i] == min_p_none:
        print(p_none[i])
        sys.exit()
N, M = map(int, input().split())
a = [True] * N
for _ in range(M):
    a[int(input())] = False


memo = {}

def find(n):
    if n == 0:
        return 1
    if n == 1:
        return 1
    if n in memo:
        return memo[n]
    memo[n] = (find(n - 1) if a[n - 1] else 0) + (find(n - 2) if a[n - 2] else 0)
    return memo[n]


print(find(N) % 1000000007)

### FIXED CODE ###

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

arr = [0] * (N + 1)
arr[1] = 1 if a[1] else 0
if 2 <= N:
    arr[2] = arr[1] + 1 if a[2] else 0
    for i in range(3, N + 1):
        arr[i] = arr[i - 2] + arr[i - 1] if a[i] else 0

print(arr[N] % 1000000007)
S = input()
count = 0
answer = "WA"

if S[0] == 'A' and S[2:-1].count('C') == 1:
    C = S.index('C')
    exception = [0]
    exception.append(C)

if len(exception) == 2:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            count += 1

if count == len(S)-2:
    answer = "AC"
    

print(answer)


### FIXED CODE ###

S = input()
count = 0
exception = [0]
answer = "WA"

if S[0] == 'A' and S[2:-1].count('C') == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) == 2:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            count += 1

if count == len(S)-2:
    answer = "AC"

print(answer)
def lcm(x, y):
    if x > y:
      greater = x
    else:
      greater = y
    while(True):
      if((greater % x == 0) and (greater % y == 0)):
        lcm = greater
        break
      greater += 1
    return lcm
n,m=mpa(int,input().split())
print(lcm(n,m))

### FIXED CODE ###

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

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


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

print(lcm(a,b))
N,M=map(int, input().split())
A=[list(map(int, input().split()))  for _ in range(M)]
A = sorted(A, reverse=False, key=lambda x: x[0])

ans=[[] for i in range(N)]
if A[0][0]==1 and A[0][1]==0:
    print(-1)
    exit(0)

elif A[0][0]==1:
    pt=0
    ans[0]=A[0][1]
    pt+=1
elif A[0][0]!=1:
    ans[0]=1
    pt=1
    while pt+1<A[0][0]:
        ans[pt]=0
        pt+=1
    ans[pt]=A[0][1]
    pt+=1

for i in range(1,M):
    while pt+1<A[i][0]:
        ans[pt]=0
        pt+=1
    if A[i-1][0]==A[i][0] and A[i-1][1]!=A[i][1]:
        print(-1)
        exit(0)
    else: ans[pt]=A[i][1]
        
print(''.join(map(str,ans))) 

### FIXED CODE ###

N,M=map(int, input().split())
A=[list(map(int, input().split()))  for _ in range(M)]
A = sorted(A, reverse=False, key=lambda x: x[0])

if M==0:
    if N==3:
        print(100)
        exit(0)
    elif N==2:
        print(10)
        exit(0)        
    elif N==1:
        print(0)
        exit(0)

if N!=1 and A[0][0]==1 and A[0][1]==0:
    print(-1)
    exit(0)
i=1
j=len(A)
while i<j:
    if A[i][0]==A[i-1][0] and A[i][1]==A[i-1][1]:
        A.pop(i)
        j-=1
        continue
    elif A[i][0]==A[i-1][0] and A[i][1]!=A[i-1][1]:
        print(-1)
        exit(0)
    i+=1
ans=[None]*N

for i,j in A:
    ans[i-1]=j

for i in range(len(ans)):
    if ans[i]==None:
        if i==0:
            ans[i]=1
        else:
            ans[i]=0

print(''.join(map(str,ans)))
N, X, Y = map(int,input().split())
X -= 1
Y -= 1

nallpath = N*(N-1)//2
distance = [0] * nallpath

indx = 0
for j in range(N-1):
    for i in range(j+1,N):
        if i <= X:
            distance[indx] = i - j
        elif j >= Y:
            distance[indx] = i - j
        elif j <= X and Y<= i:
            distance[indx] = i - j - (Y-X-1)
        elif  X <= j < i <= Y:
            distance[indx] = min(i-j, (j-X)+(Y-i)+1)
        elif j <= X and X < i <= Y:
            distance[indx] = (X-j) + min(i-X, Y-i+1)
        else:
            distance[indx] = (i-Y) + min(Y-j, j-X+1)
        indx += 1
for i in range(N-1):print(distance.count(i+1))


### FIXED CODE ###

S = input()
if S[2] == S[3] and S[4] == S[5]:
  print("Yes")
else:
  print("No")
print()
print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)

Prints the values to a stream, or to sys.stdout by default. Optional keyword arguments: file: a file-like object (stream); defaults to the current sys.stdout. sep: string inserted between values, default a space. end: string appended after the last value, default a newline. flush: whether to forcibly flush the stream.



### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()

def main():
    r, D, x = LI()
    for i in range(10):
        x = r * x - D
        print(x)
    return


main()
N, K = map(int, input().split())
A = list(map(int, input().split()))
MOD = 10 ** 9 + 7

P = []
M = []
zero = 0
for a in A:
    if a > 0:
        P.append(a)
    elif a < 0:
        M.append(a)
    else:
        zero += 1

# 0 を選ぶしかない場合
if len(P) + len(M) < K:
    print(0)
    exit()

P.sort(reverse=True)
M.sort()

# a >= 0 のとき
if len(P) + zero == N:
    ans = 1
    for k in range(K):
        ans *= P[k]
        ans %= MOD
    print(ans)
    exit()

# a <= 0 のとき
if len(M) + zero == N:
    ans = 1
    if K % 2 == 0:
        for k in range(K):
            ans *= M[k]
            ans %= MOD
        print(ans)
    else:
        if zero > 0:
            print(0)
        else:
            M.sort(reverse=True)
            for k in range(K):
                ans *= M[k]
                ans %= MOD
            print(ans)
    exit()

# a に正・負両方含まれる場合
cur_p = 0
cur_m = 0
ans = 1
for k in range(K):
    if cur_p == len(P):
        ans *= M[cur_m]
        cur_m += 1
    elif cur_m == len(M):
        ans *= P[cur_p]
        cur_p += 1
    else:
        if P[cur_p] < abs(M[cur_m]):
            ans *= M[cur_m]
            cur_m += 1
        else:
            ans *= P[cur_p]
            cur_p += 1
    ans %= MOD

if cur_m % 2 == 0:
    print(ans)
else:
    if cur_p == len(P):
        ans *= M[cur_m]
        ans *= pow(P[cur_p - 1], MOD - 2, MOD)
        ans %= MOD
    elif cur_m == len(M):
        ans *= P[cur_p]
        ans *= pow(M[cur_m - 1], MOD - 2, MOD)
        ans %= MOD
    else:
        m1 = M[cur_m - 1]
        p1 = P[cur_p]
        m2 = M[cur_m]
        p2 = P[cur_p - 1]
        if p1 / m1 > m2 / p2:
            ans *= p1
            ans *= pow(m1, MOD - 2, MOD)
            ans %= MOD
        else:
            ans *= m2
            ans *= pow(p2, MOD - 2, MOD)
            ans %= MOD
    print(ans)


### FIXED CODE ###

N, K = map(int, input().split())
A = list(map(int, input().split()))
MOD = 10 ** 9 + 7


P = []
M = []
zero = 0
for a in A:
    if a >= 0:
        P.append(a)
    elif a < 0:
        M.append(a)

ans = 1
if K == N:
    for a in A:
        ans *= a
        ans %= MOD
    print(ans)
    exit()

ans = 1
if len(P) == 0 and K % 2 == 1:
    M.sort(reverse=True)
    for k in range(K):
        ans *= M[k]
        ans %= MOD
    print(ans)
    exit()

P.sort(reverse=True)
M.sort()
S = 1
LP = len(P)
LM = len(M)
cur_p = 0
cur_m = 0
cnt = 0
ans = 1
while cnt < K:
    if K - cnt == 1 or LM - cur_m <= 1:
        flag = 'p'
    elif LP - cur_p == 1:
        if (K - cnt) % 2 == 1:
            flag = 'p'
        else:
            flag = 'm'
    elif LP - cur_p == 0:
        flag = 'm'
    else:
        p1 = P[cur_p]
        p2 = P[cur_p + 1]
        m1 = M[cur_m]
        m2 = M[cur_m + 1]
        if p1 * p2 >= m1 * m2:
            flag = 'p'
        else:
            flag = 'm'
    
    if flag == 'p':
        ans *= P[cur_p]
        ans %= MOD
        cur_p += 1
        cnt += 1
    else:
        ans *= M[cur_m] * M[cur_m + 1]
        ans %= MOD
        cur_m += 2
        cnt += 2

print(ans)
def f(X,s,t):
    N=len(s)
    i=0
    c=0
    while s[i]!=X:
        c+=int(t[i])
        i+=1
    return sum(t)-(c+int(t[i]))
N=int(input())
s=[0]*N
t=[0]*N
for a in range(0,N):
    (s[a],t[a])=map(str,input().split())
X=input()
print(f(X,s,t))
        

### FIXED CODE ###

def f(X,s,t):
    N=len(s)
    i=0
    c=0
    b=0
    while i<N and s[i]!=X:
        c+=int(t[i])
        i+=1
    #print(c)
    #print(i)
    for k in range(N):
        b+=int(t[k])
    #print(b)
    return b-(c+int(t[i]))
N=int(input())
s=[0]*N
t=[0]*N
for a in range(0,N):
    (s[a],t[a])=map(str,input().split())
X=str(input())
print(f(X,s,t))
N, Y = map(int, input().split())

answer = '-1 -1 -1'
for x in range(0,N+1):
    for y in range(0,N+1):
        z = N - x - y
        if 10000*x + 5000*y + 1000*z == Y and z >= 0:
            answer = f'{x} {y} {z}'
            break
print(answer)





### FIXED CODE ###

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

answer = '-1 -1 -1'
for x in range(N+1):
    for y in range(N+1):
        z = N - x - y
        if 10000*x + 5000*y + 1000*z == Y and z >= 0:
            answer = str(x) + ' ' + str(y) + ' ' + str(z) 
            break
print(answer)
import math
 
a,b,h,m = map(int, input().split())
h1 = int(h) * 30
m1 = int(m) * 5.5
r = abs(float(h1) - float(m1))
a1 = int(a) ** 2
b1 = int(b) ** 2
ab = int(a) * int(b)
if 180 <= int(r):
  r1 = int(r) -180
else:
  r1 = r
cos = math.cos(math.radians(int(r1)))
d = int(a1) + int(b1) - 2 * int(ab) * float(cos)
ans = d ** (1/2)
print(ans)

### FIXED CODE ###

l = input()
s = [int(i) for i in l]
l1 = len(l)
l2 = l[int(l1) - 1]
if int(l2) == 3:
  print("bon")
elif int(l2) == 0:
  print("pon")
elif int(l2) == 1:
  print("pon")
elif int(l2) == 6:
  print("pon")
elif int(l2) == 8:
  print("pon")
else:
  print("hon")
import output
r, c = map(int, input().split())
a = [[int(num) for num in input().split()] for i in range(r)]
a.append([0, 0, 0, 0, 0])
for i in range(c):
    for j in range(r):
        a[r][i] += a[j][i]
for i in range(c):
    a[i].append(sum(a[i]))
for i in range(r+1):
    for j in range(c+1):
        if j == c:
            print(a[i][j])
        else:
            print(a[i][j], end=" ")
            

### FIXED CODE ###

r, c = map(int, input().split())
a = [[0 for i in range(c+1)] for j in range(r+1)]
for i in range(r):
    j = 0
    for line in input().split():
        a[i][j] = int(line)
        a[i][c] += a[i][j]
        j += 1
for i in range(c+1):
    for j in range(r):
        a[r][i] += a[j][i]
for i in range(r+1):
    for j in range(c+1):
        if j == c:
            print(a[i][j])
        else:
            print(a[i][j], end=" ")
a, b, c = map(int, input_raw().split())
sum = 0
for i in range(a,b)
  if c%i == 0:
     sum = sum + 1
  else:
     sum = sum

print"%s" % (sum)

### FIXED CODE ###

a, b, c = map(int, raw_input().split())
sum = 0

for i in range(a,b+1):
  if c%i == 0:
     sum = sum + 1

print sum
S = input()
K = int(input())
counter = 0
for i in range(K + 1):
    if int(S[i]) != 1:
        log = counter
        num = int(S[i])
        break
    counter += 1

if K <= log:
    print(1)
else:
    print(num)

### FIXED CODE ###

S = input()
K = int(input())
counter = 0
num = 1
log = 0
for i in S:
    if int(i) != 1:
        log = counter
        num = int(i)
        break
    counter += 1

if K <= log:
    print(1)
else:
    print(num)
import sys
sys.setrecursionlimit(10**6)
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

n = int(readline())

mod = 10**9 + 7

def expo(x,n):
    var = 1
    while n>0:
        if n%2 == 1:
            var = (var*x) % mod
        x = (x*x)%mod
        n = n>>1
    return var

def conbi(*x):
    num = 1
    den = 1
    for i in range(1,sum(x)+1):
        num = (num*i)%mod
    for i in x:
        for j in range(1,i+1):
            den = (den * j)%mod
    return (num*expo(den,mod-2))%mod

path = [set() for _ in range(n)]
pathq= [0]*n

for _ in range(n-1):
    a,b = map(int,read().split())
    a -= 1
    b -= 1
    path[a].add(b)
    pathq[a] += 1
    path[b].add(a)
    pathq[b] += 1

memo = {}
def go(i,j):
    if (i,j) in memo.keys():
        return memo[(i,j)]
    else:
        memo[(i,j)] = [1,1]
        cnt = []
        meth = 1
        for k in path[j]:
            if i != k:
                [x,y] = go(j,k)
                meth *= y
                meth %= mod
                cnt.append(x)
        memo[(i,j)] = [sum(cnt)%mod + 1, meth*conbi(*cnt)%mod]
        return memo[(i,j)]

for i in range(n):
    ans = 1
    cnt = []
    meth = 1
    for j in path[i]:
        [x,y] = go(i,j)
        meth *= y
        meth %= mod
        cnt.append(x)
    print(meth*conbi(*cnt)%mod)


### FIXED CODE ###

s = input()
if s[2] == s[3] and s[5] == s[4]:
  print('Yes')
else:
  print('No')
import sys
N = input()

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


if len(A) < 3:
    print(max(A))
    sys.exit()



min_0 = A[0]
min_1 = A[1]
min_2 = A[2]


def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]



max_primes = primes(A[-1])

def soinsu(n):
    ret = [0 for _ in range(len(max_primes))]
    for p_index in range(len(max_primes)):
        p = max_primes[p_index]
        while n % p == 0:
            n /= p
            ret[p_index] += 1
    return ret

def kouyaku(x, y):
    kouyaku = 1
    for p_index in range(len(max_primes)):
        p = max_primes[p_index]
        i = min(x[p_index], y[p_index])
        kouyaku *= pow(p, i)
    return kouyaku

def check(n):
    fail_count = 0
    for a in A:
        if a % n != 0:
            fail_count +=1
            if fail_count == 2:
                return False
    return True



soinsu_0 = soinsu(min_0)
soinsu_1 = soinsu(min_1)
soinsu_2 = soinsu(min_2) 


kouyaku_01 = kouyaku(soinsu_0, soinsu_1)
kouyaku_12 = kouyaku(soinsu_1, soinsu_2)
kouyaku_02 = kouyaku(soinsu_0, soinsu_2)


ans = 1
if check(kouyaku_01):
    ans = max(ans, kouyaku_01)

if check(kouyaku_12):
    ans = max(ans, kouyaku_12)


if check(kouyaku_02):
    ans = max(ans, kouyaku_02)


print(ans)






### FIXED CODE ###

import sys
from fractions import gcd

N = int(input())

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


if len(A) < 3:
    print(max(A))
    sys.exit()


left_side = [0 for _ in range(N)]
left_side[0] = A[0]

right_side = [0 for _ in range(N)]
right_side[-1] = A[-1]



for i in range(N -1):
    left_side[i + 1] = gcd(left_side[i], A[i + 1])

for i in range(1, N):
    right_side[-1* (i + 1)] = gcd(right_side[-1* i], A[ -1 *(i + 1)])


max_gcd = 1 

# left 
max_gcd = max(max_gcd, right_side[1])
# right
max_gcd = max(max_gcd, left_side[-2])

for i in range(1, N -1 ):
    left = left_side[i - 1]
    right = right_side[i + 1]
    max_gcd = max(max_gcd, gcd(left, right))




print(max_gcd)
import numpy as np
N = int(input())
x = [int(i) for i in input().split() ]

each = 0
loss = 0
ll = []

for k in range(min(x), max(x)):
      for j in range(len(x)):
            each = np.power((x[j]-k), 2)
            loss += each
      ll.append(loss)
  
print(min(ll))

### FIXED CODE ###

import numpy as np
N = int(input())
x = [int(i) for i in input().split() ]

each = 0
loss = 0
ll = []

for k in range(min(x), max(x)+1):
      for j in range(len(x)):
            each = np.power((x[j]-k), 2)
            loss += each
      ll.append(loss)
      loss = 0
  
print(min(ll))
n,a,b=map(int,input().split())

count="b"*a
count+="r"*b

if len(count)==n:
  print(count.count("b"))
else:
  n-=len(count)
  if n<=a:
    count+="b"*n
    print(count.count("b"))
  else:
    for i in range(n):
      if i+1<=a:
        count+="b"
      if i+1==a+b:
        n-=a+b
    print(count.count("b"))

### FIXED CODE ###

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

ab=a+b
num=n//ab
n-=ab*num

if n>=a:
  ans=a
  
else:
  ans=n
  
print(ans+num*a)
n=int(input())
A=list(map(int,input().split()))

m=max(A)

X=[True]*(m+1)

A.sort()

for i in range(n):
    for j in range(A[i]*2,m+1,A[i]):
        X[j]=False

if A[0]==A[1]:
    ans=0
else:
    ans=1

for i in range(1,n):
    if A[i-1]==A[i]:
        continue
    if X[A[i]]==True:
        ans+=1
print(ans)

### FIXED CODE ###

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

m=max(A)

X=[0]*(m+1)

A.sort()

for i in range(n):
    for j in range(A[i],m+1,A[i]):
        X[j]+=1

ans=0

for i in range(n):
    if X[A[i]]==1:
        ans+=1
print(ans)
import math
 
a, b, c = input().split()
a, b, c = int(a), int(b), int(c)
 
if 4*a*b < (c - a - b)**2:
  if (c - a - b) < 0:
    print("No")
  else:
	print("Yes")
else:
  print("No")

### FIXED CODE ###

import math
 
a, b, c = input().split()
a, b, c = int(a), int(b), int(c)

d = c - a - b

if (4*a*b < d*d) and (0 < d):
  print("Yes")
else:
  print("No")
a, b = input().split()
a = int(a)
import math
b = math.floor(b*100)
ans = int(a*b/100)
print(ans)

### FIXED CODE ###

from decimal import Decimal
a,b=input().split()
print(int(Decimal(a)*Decimal(b)))
N=input()
if 7 in N:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N=input()
if "7" in N:
  print("Yes")
else:
  print("No")
ans = 0
n = int(input())
if n < 357:
  print(0)
else:
  for i in range(n):
    s = str(i)
    if s.count('7')+s.count('5')+s.count('3') == len(s):
    ans += 1
print(ans)


### FIXED CODE ###

N = int(input())

ans = 0
a = [3, 5, 7]
i = 0
while a[i] <= N:
    x10 = a[i] * 10
    a.append(x10+3)
    a.append(x10+5)
    a.append(x10+7)
    i += 1

for j in range(i):
    s = str(a[j])
    if "3" in s and "5" in s and "7" in s:
        ans += 1

print(ans)
import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

n = int(input())
t = [int(input()) for i in range(n)]

print(lcm_list(t))

### FIXED CODE ###

s = list(input())
if s[0] == s[2]:
  print("Yes")
else:
  print("No")
# -*- coding: utf-8 -*-

N = int(input())
X,L = [],[]

for _ in range(N):
    x,l = input().split()
    X.append(int(x))
    L.append(int(l))

i = 0
while i < len(X):
    
    if i>0 and X[i]-L[i] <= X[i-1]-L[i-1]:
        X.pop(i-1)
        L.pop(i-1)
    elif i<len(X)-1 and X[i]+L[i] >= X[i+1]+L[i+1]:
        X.pop(i+1)
        L.pop(i+1)
    else:
        i+=1

print(len(X))

### FIXED CODE ###

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

H,W,N = [int(input()) for _ in range(3)]

ans = N/max(H,W) if N%max(H,W)==0 else N/max(H,W)+1
print(int(ans))
N,M,V,P = map(int, input().split())
A = list(map(int,input().split()))
A.sort(reverse=True)
count = 0
for i in range (N):
  if i <= P:
    count += 1
  elif A[i] + M < A[P-1]:
    continue
  else:
    sum = M*(P-1) + M*(N-(i+1)) 
    for j in range (P,i-1):
      sum += A[P-1]+M -A[j]
    if sum >= M*V:
      count +=1
print(count)

### FIXED CODE ###

N,A,B = map(int,input().split())
if (B-A)%2 == 0:
  print((B-A)//2)
else:
  print( (B-A)//2 + 1 +min(A-1,N-B) )
N, M = map(int, input().split())
ls = []
for i in range(1,M):
  if M%i==0:
    ls += [i]
  if M**0.5<i or M//N<i:
    break
print(max(ls))

### FIXED CODE ###

N, M = map(int, input().split())
ls = []
for i in range(1,M+1):
  if M%i==0:
    j = M//i
    if i<=M//N:
      ls += [i]
    if j<=M//N:
      ls += [j]
  if M**0.5<i:
    break
print(max(ls))