peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    x = list(map(int, readline().split()))
    print(x.index(0) + 1)


if __name__ == '__main__':
    solve()
# Judge status: Wrong Answer
a = int(input())
b = int(input())
c = int(input())
x = int(input())

count = 0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*a + 100*b + 50*c == x:
        count += 1
print(count)
# Judge status: Accepted
a,b,c=map(int,input().split())
k=int(input())
count=0
while a>=b:
  b=b*2
  count+=1
  
while b>=c:
  c=c*2
  count+=1
  
if count<=k:
  print('Yes')
else:
  print("No")
# Judge status: Accepted
x, y = map(int, input().split())

ans = 0

while x <= y:
  x *= 2
  ans += 1
  
print(ans)
# Judge status: Accepted
from functools import reduce
from fractions import gcd
N,X=map(int,input().split())
x=[abs(X-int(i)) for i in input().split()]
print(reduce(gcd,x))
# Judge status: Accepted
n = int(input())
count = 0

for i in range(1,10):
    for j in range(1,10):
        if n == i*j:
            count += 1

        else:
            pass
print(['No','Yes'][count != 0])
# Judge status: Wrong Answer
b = list(map(int, input().split()))
if b[0]==b[1]:
    print(2*b[0]-1)
else:
    print(2*max(b)-1)
# Judge status: Accepted
def reverse_str(s):
    return ''.join(list(s)[::-1])


words = list(map(reverse_str, 'dream dreamer erase eraser'.split()))
S = reverse_str(input())
ok = True
while S:
    for r in range(5, 8):
        tmp = S[:r]
        if tmp in words:
            # print(S, end=' => ')
            S = S[r:]
            # print(S)
            break
    else:
        ok = False
        break
print('YES' if ok else 'NO')
# Judge status: Accepted
n, m, k = map(int, input().split())

for i in range(m+1):
    for j in range(n+1):
        #print((n - j) * i + (m - i) * j)
        if (n - j) * i + (m - i) * j == k:
            print("Yes")
            exit()

print("No")
# Judge status: Accepted
mod = 10**9 + 7
X, Y = map(int, input().split())

if (X+Y) % 3 != 0:
    print(0)
    exit()

a = (2*Y-X)//3
b = (2*X-Y)//3
if a < 0 or b < 0:
    print(0)
    exit()

m = min(a, b)

ifact = 1
for i in range(2, m+1):
    ifact = (ifact * i) % mod
ifact = pow(ifact, mod-2, mod)
fact = 1
for i in range(a+b, a+b-m, -1):
    fact = (fact * i) % mod

print(fact*ifact % mod)
# Judge status: Accepted
import math

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

hour_deg = (h + m / 60) / 12 * 360
min_deg = (m / 60) * 360

deg_diff = abs(min_deg - hour_deg)
ans = a**2 + b**2 - (2 * a * b * math.cos(math.radians(deg_diff)))
print(math.sqrt(ans))
# Judge status: Wrong Answer
A, B, C = map(int, input().split())

print(max(A * 10 + B + C, A + B * 10 + C))
# Judge status: Accepted
num = list(map(float, input().split()))

for i in range(5):
  if num[i] == 0:
    print(i + 1)
    break
# Judge status: Wrong Answer
k = int(input())
if k%2 == 0:
    print(k//2**2)
else:
    print((k-1)*(k+1)//4)
# Judge status: Accepted
A, B = map(int,input().split())
if A < 6:
    print(0)
elif A < 13:
    print(B//2)
else:
    print(B)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

for i in range(n):
    a[i] -= i + 1

a.sort()

b = a[n//2]

print(b * (n//2) - sum(a[:n//2]) + sum(a[n//2:]) - b * (n - n//2))
# Judge status: Accepted
a=int(input())
s=input()

if a>=3200:
  print(s)
else:
  print("red")
# Judge status: Accepted
A, B, C = list(map(int, input().split()))

ListA = [A]*10000
ListB = [B]*10000
ListC = [C]*10000

if A%2==1 or B%2==1 or C%2==1:
	print(0)
	exit()

for i in range (1, 10000):
	ListA[i]= ListB[i-1]/2+ListC[i-1]/2
	ListB[i]= ListA[i-1]/2+ListC[i-1]/2
	ListC[i]= ListA[i-1]/2+ListB[i-1]/2
	if ListA[i]%2==1 or ListB[i]%2==1 or ListC[i]%2==1:
			print(i)
			exit()

print(-1)
# Judge status: Accepted
A, B, C, D = map(int, input().split())

while True:
    C -= B
    if C <= 0:
        print('Yes')
        break
    A -= D
    if A <= 0:
        print('No')
        break
# Judge status: Accepted
k, n = map(int, input().split())
a = list(map(int, input().split()))

dist = []

for i in range(n-1):
    dist.append(a[i+1] - a[i])
dist.append(k-a[-1]+a[0])

print(k-max(dist))
# Judge status: Accepted
N = int(input())
scores = [int(input()) for i in range(N)]

not_multiple_of_ten = [i for i in scores if i % 10 != 0]

max_score = sum(scores)

if max_score % 10 != 0:
    print(max_score)
else :
    if len(not_multiple_of_ten) == 0:
        print(0)
    else :
        print(max_score-min(not_multiple_of_ten))
# Judge status: Wrong Answer
n = int(input())
h = list(map(int,input().split()))
dp = [1000001] * n 
dp[0] = 0
dp[1] = abs(h[1] - h[0])

def chmin(a, b):
    if a <= b:
        pass
    else:
        a = b
    return a

for i in range(2, n):

    dp[i] = chmin(dp[i],dp[i - 2] + abs(h[i - 2] - h[i]))
    dp[i] = chmin(dp[i],dp[i - 1] + abs(h[i - 1] - h[i]))
    
print(dp[n - 1])
# Judge status: Wrong Answer
import itertools

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

def gcd_3(a,b,c):
    p = gcd(a,b)
    q = gcd(p,c)
    return q

k = int(input())
ans = 0

num = list(itertools.combinations_with_replacement(range(1,k+1),3))

for l in num:
    a,b,c = l
    if a==b==c:
        ans += a
    else:
        ans += gcd_3(a,b,c)*3
print(ans)
# Judge status: Wrong Answer
n,m,k=map(int,input().split())

if k%n==0 or k%m==0:
    print('Yes')
    exit()
k=min(m*n-k,k)
for i in range(1,n):
    for j in range(1,m):
        if i*n+j*m-2*i*j==k:
            print('Yes')
            exit()
print('No')
# Judge status: Accepted
X, Y = map(int, input().split())
m = 2 * X
M = 4 * X

if Y % 2 == 1:
    print("No")
elif Y > M or Y < m:
    print("No")
else:
    print("Yes")
# Judge status: Accepted
import math

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

a_low = math.ceil(a*12.5)
a_high = math.floor((a+1)*12.5-0.01)
b_low=b*10
b_high=b*10+9

if b_high < a_low or a_high < b_low:
    print(-1)
else:
    print(max(a_low, b_low))
# Judge status: Accepted
N = int(input())
S = input()

if N % 2 == 0:
    num = int(N/2)
    string = S[:num]
    strstr = string + string
    if S == strstr:
        print("Yes")
    else:
        print("No")
else:
    print("No")
# Judge status: Accepted
def main():
    n, k = [int(x) for x in input().split()]
    scores = [int(x) for x in input().split()]

    for index in range(n - k):
        if scores[index] < scores[index + k]:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()
# Judge status: Accepted
def main():
    x, y = map(int, input().split())

    if x in [1, 3, 5, 7, 8, 10, 12] and y in [1, 3, 5, 7, 8, 10, 12]:
        print("Yes")
    elif x in [4, 6, 9, 11] and y in [4, 6, 9, 11]:
        print("Yes")
    elif x in [2] and y in [2]:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()
# Judge status: Accepted
def solve():
  D = int(input())
  C = list(map(int, input().split()))
  S = [list(map(int, input().split())) for _ in range(D)]

  ans = [1]*D
  for d in range(D):
    maxi = 0
    contest = 0
    for i in range(26):
        if S[d][i]>maxi:
            contest = i
            maxi = S[d][i]
    ans[d] = contest+1
  
  return ans
print(*solve(),sep='\n')
# Judge status: Accepted
input_n = input()
n = str(input_n)

#listN = list(n)
listN = n.split(' ')

distance = int(listN[0])
time = int(listN[1])
speed = int(listN[2])

if (distance / speed) <= time:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
_, _, *lst = map(int, open(0).read().split())
l, r = max(lst[::2]), min(lst[1::2])
print(0 if l > r else r - l + 1)
# Judge status: Wrong Answer
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    l,r=map(int,input().split())
    l_m=l%2019
    r_m=r%2019
    if l//2019==r//2019:
        print(l_m*(l_m+1)%2019)
    else:print(0)

if __name__=='__main__':
    main()
# Judge status: Wrong Answer
A,B,C = map(int, input().split())
r = max(A,B,C)*10 + B +C
print(int(r))
# Judge status: Wrong Answer
def test2(x):
    t = int(pow((x//2),0.2))
    if(pow(t,5) == x):
        print(t,-t)
    else:
        j = -int(pow(x,0.2))
        i = int(pow((x + pow(j,5)),0.2))

        print(i,j)
        return()
# for i in range(1,100000):
#     test(i)
#     test2(i)


x = int(input())
test2(x)
# Judge status: Accepted
import sys
import bisect
input = sys.stdin.readline
n = int(input())
a = [int(input()) for i in range(n)]
ans = 0
color = [a[n-1]]
for i in range(n-2,-1,-1):
    if a[i]>=color[-1]:
        color.append(a[i])
    else:
        x = bisect.bisect_right(color,a[i])
        color[x] = a[i]
print(len(color))
# Judge status: Accepted
from math import gcd

n = int(input())
a = list(map(int, input().split()))
l = [a[-1], a[0]]
r = [a[-1]]
for x in a[1:-1]:
    l.append(gcd(l[-1], x))
for x in a[-2:0:-1]:
    r.append(gcd(r[-1], x))
r = r[::-1]
r.append(a[0])
print(max(gcd(l[i], r[i]) for i in range(n)))
# Judge status: Accepted
S=input()
if 'AAA'==S or 'BBB'==S:
    print('No')
else:
    print('Yes')
# Judge status: Accepted
import sys,math,collections,itertools
input = sys.stdin.readline

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

count = 1
while X<=Y:
    count +=1
    X*=2
print(count-1)
# Judge status: Accepted
S=input()
print("x"*len(S))
# Judge status: Accepted
n = int(input())
if n % 1000 == 0:
    print(0)
else:
    print(1000 - n % 1000)
# Judge status: Accepted
s = input()
n = len(s)

ans = 'NO'
for i in range(n):
    for j in range(i-1, n):
        string = s[:i] + s[j+1:]
        if string == 'keyence':
            ans = 'YES'
print(ans)
# Judge status: Wrong Answer
def main():
    n, m = map(int, input().split())
    xs = list(map(int, input().split()))
    xs = sorted(xs)
    diff_xs = sorted([xs[i+1] - xs[i] for i in range(m-1)])
    ans = sum(diff_xs[:m-n])
    print(ans)


if __name__ == "__main__":
    main()
# Judge status: Accepted
X,Y=map(int,input().split())
if X%Y==0:
  print(-1)
  exit()
  
i = 2
while True:
  if X*i % Y != 0 and X*i <= 10**18:
    print(X*i)
    exit()
  i += 1
  if X*i > 10**18:
    print(-1)
    exit()
# Judge status: Accepted
n, k = map(int, input().split())
R, S, P = map(int, input().split())
a = input()
flag = [False] * n


def win(x):
    if x == "r":
        return P
    elif x == "s":
        return R
    else:
        return S


su = 0
for i in range(n):
    if i - k >= 0 and a[i-k] == a[i] and not flag[i-k]:
        flag[i] = True
        continue
    else:
        su += win(a[i])
print(su)
# Judge status: Wrong Answer
s = input()
print('A'+s[0]+'C')
# Judge status: Accepted
A, B = map(int, input().split())
print(A * B if A < 10 and B < 10 else -1)
# Judge status: Accepted
a = list(map(str, input().split()))
print("{}{}".format(a[1], a[0]))
# Judge status: Accepted
s=(input())
s1=int(s[:2])
s2=int(s[2:])
 
if 1<= s1 <=12 and 1<= s2 <= 12:
    print("AMBIGUOUS")
 
elif 0<= s1 <=99 and 1<= s2 <= 12:
    print("YYMM")
 
elif 1<= s1 <=12 and 0<= s2 <= 99:
    print("MMYY")
 
else:
    print("NA")
# Judge status: Wrong Answer
from collections import Counter

N = int(input())
S = input()
c = Counter(S)
# print('c', c)

ans = 1
for v in c.values():
    ans *= v + 1
ans -= 1
print(ans)
# 4C4 = 1
# 4C3 = 4
# 4C2 = 6
# 4C1 = 4

# b
#  a
#   a
# ba
# b a
# Judge status: Accepted
N, x = map(int, input().split())
A = list(map(int, input().split()))


ans = 0
for i in range(len(A)-1):
    if A[i] + A[i+1] > x:
        if A[i] >= x:
            ans += A[i] - x
            ans += A[i+1]
            A[i+1] = 0
        else:
            tmp = A[i] + A[i+1] - x
            ans += tmp
            A[i+1] -= tmp
print(ans)
# Judge status: Accepted
x,y=map(int,input().split())
a=[0,1,3,1,2,1,2,1,1,2,1,2,1]
print("Yes" if a[x]==a[y] else "No")
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
if a.count(0)>0:
  a=list(map(abs,a))
  print(sum(a))
else:
  a.append(0)
  for i in range(n):
    if a[i]<0:
      a[i+1]*=-1
    if i!=n-1:
      a[i]=abs(a[i])
  if a[-2]>0:
    print(sum(a))
  else:
    a.pop(-1)
    a[-1]=abs(a[-1])
    print(sum(a)-2*min(a))
# Judge status: Accepted
a,b = map(int,input().split())
if a>b and a!=1 and b!=1:
    print("Alice")
elif a<b and a!=1 and b!=1:
    print("Bob")
elif a==b:
    print("Draw")
elif a==1:
    print("Alice")
else:
    print("Bob")
# Judge status: Accepted
S = input()
N = len(S)
alr = set()

tmp = ""
prev = ""
i = 0
ans = 0
while i < N:
    tmp += S[i]
    if tmp != prev:
        prev = tmp
        ans += 1
        alr.add(tmp)
        tmp = ""
    i += 1

print(ans)
# Judge status: Accepted
n, x = map(int, input().split())
l = list(map(int, input().split()))

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

for i in range(len(d)):
    if d[i] <= x:
        count += 1

print(count)
# Judge status: Wrong Answer
s = input()
l = len(s)
su = 0
for i in range(1,l-1):
 # print(su)
  if s[i]=="U":
    su += 1*(l-1-i)+2*(i)
  else:
    su += 1*(i)+2*(l-i-1)
print(su+2*(l-1))
# Judge status: Accepted
def main():
    s = input()
    n = len(s)
    min_diff = 1000

    for i in range(n - 2):
        diff = abs(int(s[i: i+3]) - 753)
        if diff < min_diff:
            min_diff = diff

    print(min_diff)


if __name__ == "__main__":
    main()
# Judge status: Accepted
from itertools import accumulate
def main():
  N = int(input())
  A = [int(_) for _ in input().split()]
  B = list(accumulate(A))
  s = B[-1]
  B = [abs(2 * b - s) for b in B]
  print(min(B[:-1]))
  return

if __name__ == '__main__':
  main()
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    import fractions
    a,b,c,d=map(int, input().split())
    e=c*d//fractions.gcd(c,d)
    ckosu=b//c-(a-1)//c
    dkosu=b//d-(a-1)//d
    ekosu=b//e-(a-1)//e
    print(b-a+1-(ckosu+dkosu-ekosu))
resolve()
# Judge status: Accepted
r = int(input())

ans = r**2
print(ans)
# Judge status: Accepted
import sys

sys.setrecursionlimit(10 ** 5 + 10)


def input(): return sys.stdin.readline().strip()


def resolve():
    a, b, c, x, y = map(int, input().split())
    ans = 10 ** 10
    yen = 0
    if a + b > c * 2:
        yen += (c * 2 * min(x, y))
        x, y = x - min(x, y), y - min(x, y)

        if x > 0:
            yen += min(x * a, x * 2 * c)
        else:
            yen += min(y * b, y * 2 * c)

    else:
        yen += a * x + b * y
    print(yen)


resolve()
# Judge status: Accepted
n = int(input())
L = []
for i in range(n):
  s = input()
  cur = []
  for j in range(10):
    cur.append(s[j])
  cur.sort()
  t = ''
  for j in range(10):
    t += cur[j]
  L.append(t)
L.sort()
ans = 0
L.append('end')
temp = 1
for i in range(1,n+1):
  if L[i] != L[i-1]:
    ans += temp*(temp-1)//2
    temp = 1
  else:
    temp += 1
print(ans)
# Judge status: Accepted
s = input()
n = len(s) // 2
p = n
j = -1

for i in range(n):
    if s[i] == s[j]:
        p -= 1
    j -= 1

print(p)
# Judge status: Accepted
n,m=map(int,input().split())
ans=list(map(int,input().split()))
arr=[list(map(int,input().split())) for _ in range(m)]
arr=sorted(arr,reverse=True,key=lambda x:x[1])
tmp=0
for cnt,val in arr:
  ans+=[val]*cnt
  tmp+=cnt
  if tmp>=n:
    break
ans=sorted(ans,reverse=True)
print(sum(ans[:n]))
# Judge status: Accepted
N = int(input())
A = []
for _ in range(N):
    A.append(int(input()))

cnt = 0
for i in range(N):
    if i > 0:
        if A[i - 1] == 1 and A[i] > 0:
            A[i] -= 1
            cnt += 1
            A[i - 1] -= 1
    cnt += A[i] // 2
    A[i] %= 2

print(cnt)
# Judge status: Accepted
s = input()
ans1 = 0
ans = 0
for i in range(3):
    if s[i]=="R":
        ans1 += 1
    else:
        ans = ans1
        ans1 = 0
if not s=="RSS":
    print(max(ans,ans1))
else:
    print("1")
# Judge status: Accepted
import math

A, B = [int(_) for _ in input().split()]
N = math.gcd(A, B)

ans = 1
for i in range(2, int(math.sqrt(N)+1) + 1):
    if N % i == 0:
        ans += 1
        while N % i == 0:
            N //= i
if N > 1:
    ans += 1
print(ans)
# Judge status: Accepted
n = int(input())
cnt = 0
for i in range(n):
    a, b = map(int, input().split())
    if a == b: 
        cnt += 1
    else:
        cnt = 0
    if cnt >= 3:
        print("Yes")
        break
    if cnt < 3 and i == n-1:
        print("No")
# Judge status: Accepted
N,R = map(int,input().split())

inside = 0
if N >= 10:
  inside = R
else:
  inside = R + 100*(10-N)

print(inside)
# Judge status: Accepted
N = int(input())
XL = [list(map(int, input().split())) for x in range(N)]

XL = sorted(XL, key=lambda x: x[0]+x[1])

cnt = 0
prev_right = -10**9+10
for x, l in XL:
    left = x - l
    right = x + l
    if left >= prev_right:
        cnt += 1
        prev_right = right

print(cnt)
# Judge status: Accepted
n,x,y=map(int, input().split())
ans=[0]*n
for i in range(1,n+1):
    for j in range(1,n+1):
        if i>=j:
            continue
        ans[min(j-i, abs(x-i)+abs(y-j)+1)]+=1
for k in range(1,n):
    print(ans[k])
# Judge status: Accepted
print('vowel' if input() in ['a', 'i', 'u', 'e', 'o'] else 'consonant')
# Judge status: Accepted
l=int(input())
print((l/3)**3)
# Judge status: Accepted
n = int(input())
L = list(map(int,input().split()))
ans = 0
for i in range(n):
    for j in range(i+1, n):
        for k in range(j+1, n):
            T = [L[i], L[j], L[k]]
            T.sort()
            if T[0] != T[1] and T[1] != T[2]:
                if T[2] < T[0]+T[1]:
                    ans += 1
print(ans)
# Judge status: Accepted
import math

hp , attack = map(int,input().split())

if(hp <= attack):
    ans = "1"
else:
    ans = str(math.ceil(hp / attack))

print(int(ans))
# Judge status: Accepted
from collections import Counter
n = int(input())
lst = list(map(int, input().split()))
mclst = Counter(lst).most_common()
sqlst = []
rclst = []
for tpl in mclst:
  if tpl[1] >= 2:
    rclst.append(tpl[0])
  if tpl[1] >= 4:
    sqlst.append(tpl[0])
sqmax, rcmax = 0, 0
if len(sqlst) >= 1:
  sqmax = max(sqlst) ** 2
if len(rclst) >= 2:
  rclst.sort(reverse=True)
  rcmax = rclst[0] * rclst[1]
print(max(sqmax, rcmax))
# Judge status: Accepted
n, w = map(int, input().split())
p = [list(map(int, input().split())) for _ in range(n)]
p.insert(0, [0, 0])
dp = [[0 for _ in range(w + 1)] for _ in range(n + 1)]
for i in range(1, n + 1):
    for j in range(1, w + 1):
        if j >= p[i][0]:
            dp[i][j] = max(dp[i - 1][j], dp[i - 1][j - p[i][0]] + p[i][1])
        else:
            dp[i][j] = dp[i - 1][j]
print(dp[n][w])
# Judge status: Accepted
import math
def main():
    K = int(input())
    if K % 2 == 0:
        print(K**2//4)
    else:
        print(math.floor(K//2)*(math.floor(K//2)+1))
if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
from collections import defaultdict
n=int(input())
a=list(map(int,input().split()))
b=[]
d=defaultdict(int)
for i in range(n):
    d[a[i]]+=1

for i,j in d.items():
    if j>=2:
        b.append(i)

if len(b)<2:
    print(0)
else:
    b.sort(reverse=True)
    print(b[0]*b[1])
# Judge status: Accepted
n = int(input())
ans = "Christmas"
for _ in range(25-n):
    ans += " Eve"

print(ans)
# Judge status: Accepted
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())

    if N % 2:
        print(0)
        return

    N //= 10
    ans = N
    while N:
        N //= 5
        ans += N

    print(ans)
    return


if __name__ == '__main__':
    main()
# Judge status: Accepted
N = int(input())

if N >= 1000:
    print("ABD")
if N < 1000:
    print("ABC")
# Judge status: Wrong Answer
x = int(input())

c = x // 11
m = x % 11
if m > 5:
    ans = c * 2 + 2
elif m > 0:
    ans = c * 2 + 1
else:
    ans = c * 2
print(ans)
# Judge status: Accepted
import math

N = int(input())

ans = math.floor(math.sqrt(N)) ** 2

print(ans)
# Judge status: Accepted
n,k=map(int,input().split())
l=[0]*(10**5+1)
for _ in range(n):
  a,b=map(int,input().split())
  l[a]+=b
for i in range(10**5+1):
  k-=l[i]
  if k<=0:
    print(i)
    break
# Judge status: Accepted
n = int(input())
*a, = map(int, input().split())
ans = 1000
for i, j in zip(a, a[1:]):
    if i<j:
        ans = ans//i*j + ans%i
print(ans)
# Judge status: Accepted
a, b, c = map(int, input().split())
l = []
for i in range(1, b+1):
    l.append((a*i)%b)
if c in l:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
import numpy as np
A, B, C, D = map(int, input().split())

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

g = gcd(C, D)
l = (C*D)//g

x = B - ((B//C) + (B//D) - (B//l))
A = A-1
y = A - ((A//C) + (A//D) - (A//l))

print(x - y)
# Judge status: Accepted
n = int(input())
ns = list(map(int, input().split()))[::-1]
lis = []
count = 0
for i in range(n-1):
    if ns[i] <= ns[i+1]:
        count += 1
    else:
        count = 0
    lis.append(count)
if n == 1:
    print(0)
else:
    print(max(lis))
# Judge status: Accepted
N = input()

s = 0
for x in N:
    s += int(x)

print('Yes' if s % 9 == 0 else 'No')
# Judge status: Wrong Answer
import sys
input=sys.stdin.readline

m,n=map(int,input().split())
A=list(map(int,input().split()))
print(m-sum(A))
# Judge status: Wrong Answer
A, B, C = map(int, input().split())
if A <= C <= B:
	print('YES')
else:
	print('NO')
# Judge status: Wrong Answer
n=int(input())
for i in range(n):
  if i**2>n:
    print((i-1)**2)
    break
# Judge status: Wrong Answer
import itertools
import math
n=int(input())
lis=[list(map(int,input().split())) for i in range(n)]

num=[j for j in range(n)]
new=list(itertools.permutations(num))
ans=0
for i in range(len(new)):
    for j in range(n-1):
        a=new[i][j]
        b=new[i][j+1]
        ans+=math.sqrt((lis[a][0]-lis[a][1])**2+(lis[b][0]-lis[b][1])**2)
print(ans/len(new))
# Judge status: Accepted
N = int(input())
S = input()

ans = 0
for i in range(1,N-1):
  set1 = set(S[:i])
  set2 = set(S[i:])
  z = set1.intersection(set2)
  ans = max(ans,len(z))

print(ans)
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-

def main():

    X = int(input())

    num = 100
    ans = 0

    while num < X:
        num = num + int(num * 0.01)
        ans +=1

    print(ans)


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
A,B,C=map(int,input().split())
if A+B>C:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
n,m,k = map(int,input().split())
for i in range(1,n+1):
  for j in range(1,m+1):
    if i*(n-j)+ j*(m-i) == k:
      print('Yes')
      exit()
print('No')
# Judge status: Accepted
N=int(input())
S=input()
print("".join(chr(65+(ord(s)-65+N)%26) for s in S))
# Judge status: Accepted
n, k = map(int, input().split())
d = list(map(str, input().split()))
for i in range(n, 10**5):
    num = str(i)
    for j in range(len(num)):
        if num[j] in d:
            break
    else:
        print(i)
        break
# Judge status: Accepted
a,b,k=map(int,input().split())
for i in range(a,b+1):
    if i not in range(a+k,b+1-k):
        print(i)
# Judge status: Accepted
n= int(input())
ans=1
P = list(map(int, input().split()))
minmin= P[0]
for i in P:
  if minmin>i:
    minmin=i
    ans+=1
    
print(ans)
# Judge status: Wrong Answer
n = int(input())
s = input()
kuro = 0
siro = 0
p = 0 
for i in range(n):
    if p == 0 and s[i] == "#":
        p = 1
    if p == 1 and s[i] == ".":
        siro += 1

p = 0
for i in reversed(range(n)):
    if p == 0 and s[i] == ".":
        p = 1
    if p == 1 and s[i] == "#":
        kuro += 1
        
print(min(siro,kuro))
# Judge status: Accepted
def readints():
    return list(map(int, input().split()))


n, d = map(int, input().split())
a = 2*d+1
print(-(-n // a))
# Judge status: Accepted
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

o = rr()
e = rr()
s = ''
for a, b in itertools.zip_longest(o, e, fillvalue=''):
  s += a + b
print(s)
# Judge status: Accepted
import math

r=input()
a=(int)(r)*2*math.pi
print(a)