Harryxun/stf_run huggingface dataset:
from math import floor, sqrt, ceil


def f(b, n):
    if n < b:
        return n

    return f(b, floor(n / b)) + n % b


n = int(input())
s = int(input())

if n == s:
    print(n + 1)
    exit()

for b in range(2, floor(sqrt(n)) + 1):
    if f(b, n) == s:
        print(b)
        exit()

for p in range(1, ceil(sqrt(n)))[::-1]:
    b = (n - s) / p + 1
    if b.is_integer():
        b = int(b)
        if f(b, n) == s:
            print(b)
            exit()

print(-1)


### FIXED CODE ###

from math import floor, sqrt, ceil


def f(b, n):
    if b < 2:
        return 0

    if n < b:
        return n

    return f(b, floor(n / b)) + n % b


n = int(input())
s = int(input())

if n == s:
    print(n + 1)
    exit()

for b in range(2, floor(sqrt(n)) + 1):
    if f(b, n) == s:
        print(b)
        exit()

for p in range(1, ceil(sqrt(n)))[::-1]:
    b = (n - s) / p + 1
    if b.is_integer():
        b = int(b)
        if f(b, n) == s:
            print(b)
            exit()

print(-1)
n = int(input())
s = input()

rs = {}
gs = {}
bs = {}

for i, e in enumerate(s):
  if e == 'R':
    rs[i] = ''
  if e == 'G':
    gs[i] = ''
  if e == 'B':
    bs[i] = ''

a = max(bs.keys())
b = min(bs.keys())
      
saidai = len(rs) * len(gs) * len(bs)
if saidai == 0:
  print('0')
else:
  for i in rs.keys():
    for j in gs.keys():
      mi = i if i < j else j
      ma = j if i < j else i
      p = [mi - (ma - mi), mi + (ma - mi)/2, ma + (ma - mi)]
      for e in p:
        if e%1 != 0 or e < b or e > a:
          continue
        if e in bs:
          saidai -= 1
  print(int(saidai))


### FIXED CODE ###

n = int(input())
s = input()

rs = {}
gs = {}
bs = {}

for i, e in enumerate(s):
  if e == 'R':
    rs[i] = ''
  if e == 'G':
    gs[i] = ''
  if e == 'B':
    bs[i] = ''
    
saidai = len(rs) * len(gs) * len(bs)
if saidai == 0:
  print('0')
else:
  a = max(bs.keys())
  b = min(bs.keys())
  for i in rs.keys():
    for j in gs.keys():
      mi = i if i < j else j
      ma = j if i < j else i
      p = [mi - (ma - mi), mi + (ma - mi)/2, ma + (ma - mi)]
      for e in p:
        if e%1 != 0 or e < b or e > a:
          continue
        if e in bs:
          saidai -= 1
  print(int(saidai))
n, k = (int(i) for i in input().split())
a = [int(i) for i in input().split()]
a.sort()
diff_min = 10*9 + 7
for i in range(n-1):
    diff = abs(a[i] - a[i+1])
    diff_min = min(diff_min,diff)

for i in range(n):
    if a[i] - k >= 0 and (a[i] - k)%diff_min == 0:
        print("POSSIBLE")
        break
else:
    print("IMPOSSIBLE")

### FIXED CODE ###

def main():
    n, k = (int(i) for i in input().split())
    a = [int(i) for i in input().split()]
    a.sort()
    diff_min = 10**9 + 7
    for i in range(n-1):
        diff = abs(a[i] - a[i+1])
        diff_min = (min(diff_min,diff) if diff != 0 else diff_min)
    for i in range(n):
        diff_min = (a[i] % diff_min if a[i] % (diff_min) != 0 else diff_min)
    for i in range(n):
        if a[i] - k >= 0 and (a[i] - k)%diff_min == 0:
            print("POSSIBLE")
            break
    else:
        print("IMPOSSIBLE")
if __name__ == '__main__':
    main()
h, n = map(int, input().split())

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

a = sorted(a)

if(a[0] + a[1] >= h):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

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

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

a = sorted(a)

if(sum(a) >= h):
    print("Yes")
else:
    print("No")
import math
a, b = map(int, input().split())

if b = 1:
  ans = 0
else:
  ans = math.ceil((b - 1) / (a - 1))

print(ans)


### FIXED CODE ###

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

if b == 1:
  ans = 0
else:
  ans = math.ceil((b - 1) / (a - 1))

print(ans)
import math
import scipy.optimize

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

def func_a(theta):
    S = 0.5 * b**2 / math.tan(theta)
    V = S * a
    equal = x - V

    return equal

def func_b(theta):
    S = a * b - 0.5 * a**2 * math.tan(theta)
    V = S * a
    equal = x - V

    return equal

if x <= 0.5 * a**2 * b:
    result = scipy.optimize.bisect(func_a, 0 + 10**(-6), math.pi/2 - 10**(-6))
else:
    result = scipy.optimize.bisect(func_b, 0 + 10**(-6), math.pi/2 - 10**(-6))

print(math.degrees(result))


### FIXED CODE ###

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

V_max = a * a * b

if x <= 0.5 * V_max:
    theta = math.atan((a*b*b)/(2*x))
else:
    theta = math.atan(2*(a**2*b - x)/(a**3))

print(math.degrees(theta))
n,m,X,Y = map(int,input().split())
x = map(int,input().split())
y = map(int,input().split())

print(["War","No War"][X<min(y) and max(x)<Y and max(x)<min(y)])



### FIXED CODE ###

n,m,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))

print(["War","No War"][X<min(y) and max(x)<Y and max(x)<min(y)])
import copy

N = int(input()) 
s = list(map(int, input().split()))
s2 = copy.copy(s)
s.sort(reverse=True)
n = 0
for i in range(0, len(x)):
    if x[i] - x2[i] != 0:
        n+=1
if n == 2:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

import copy

N = int(input()) 
s = list(map(int, input().split()))
s2 = copy.deepcopy(s)
s.sort()
n = 0
for i in range(0, len(s)):
    if s[i] - s2[i] != 0:
        #print(s[i], s2[i])
        n+=1

if n == 2:
  print("YES")
elif n == 0:
    print("YES")
else:
  print("NO")
N, K = map(int, input().split())
A = list(map(int, input().split()))
F = list(map(int, input().split()))

##　Aは昇順Fは降順に並び替える
A.sort() 
F.sort(reverse = True)

##　成績(A × F)の目標をxにしたときに何回修行が必要かを求める関数
def target(x):
    train_count = 0
    for i in range(N):
        a = A[i]
        targ_a = x // F[i] #目標を達成した時の消費コストA
        if targ_a < a:
            train_count = train_count + a - targ_a 
    return train_count <= K　#ただし合計がKを超えないもの

##　二分探索(リストを半分ずつ削って達成可能な目標を探す)
left = -1                        #一番左
right = A[-1] * F[0]             #一番右(Aの最大値 × Fの最大値)
while right > left + 1:          #一番右が一番左より大きい間（一致したら終了）
    middle = (left + right) // 2 #真ん中
    if target(middle):           #目標を真ん中にして達成可能なら
        right = middle           #一番右を真ん中にする（残りの右側は無駄に時間かかってるから切り捨てる）
    
    else:                        #達成できないなら(K回を超えてしまうとき）
        left = middle            #一番左を真ん中にする（残りの左側は達成不可だから切り捨てる）

print(right)


### FIXED CODE ###

import numpy as np

import sys
input = sys.stdin.buffer.readline

N, K = map(int, input().split())
A = np.array(input().split(), np.int64)
F = np.array(input().split(), np.int64)

A.sort()
F.sort()

F= F[::-1]

left = -1
right = (A * F).sum()
while left + 1 < right:
  middle = (left + right) // 2
  right_arr = np.maximum(0, A - middle // F).sum() <= K
  if right_arr:
    right = middle
  else:
    left = middle
print(right)
bottom = []
while True:
	carnum = input()
	if carnum == '':
		break
	elif carnum == 0:
		bottom.pop()
		continue
	else:
		nottom.append(carnum)
		continue

### FIXED CODE ###

bottom = []
exits = []
while True:
	carnum = raw_input()
	if carnum == '':
		break
	elif carnum == '0':
		exits.append(bottom[0])
		del bottom[0]
		continue
	else:
		bottom.insert(0,int(carnum))
		continue
for val in exits:
	print val
N, X, T = (int(a) for a in input().split())
print(math.ceil(N / X) * T)

### FIXED CODE ###

import math
N, X, T = (int(a) for a in input().split())
print(math.ceil(N / X) * T)
N,A,B = map(int, input().split())
ten_keta = N[:1]
one_keta = N[1:]
ans = 0

for i in range(N+1):
    if int(ten_keta) + int(one_keta) >= A and ten_keta + one_keta <= B:
        ans += i

print(ans)



### FIXED CODE ###

n, a, b = map(int, input().split())
 
sum = 0
for i in range(n+1) :
    count = 0
    for num in str(i) :
        count += int(num)
 
    if (count >= a) and (count <= b) :
        sum += i
            
print(sum)
x,n=map(int,input().split())
p=list(map(int,input().split()))

pl=[]
if n==0:
    print(x)
else:
    for i in range(n):
        pl.append(abs(p[i]-x))
    sort_p=sorted(pl)
    #print(sort_p)
    if n==1:
        if sort_p[0]!=0:
            print(x)
        else:
            print(x-1)
    else:
        num=0
        if sort_p[0]!=0:
            print(x)
        else:
            for i in range(1,n):
                if i%2!=0:
                    num+=1
                if sort_p[i]!=num:
                    ans=num
                    break
            small=x-ans
            big=x+ans
            if (small not in p)&(big not in p):
                print(small)
            elif small in p:
                print(big)
            elif big in p:
                print(small)

### FIXED CODE ###

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

if n==0:
    print(x)
    exit()

for i in range(n):
    if x-i not in p:
        print(x-i)
        exit()
    if x+i not in p:
        print(x+i)
        exit()
print(x-n)
import math
a, b=map(int, input().split())
print(a*b//math.gcd(a,b))


### FIXED CODE ###

import fractions
a, b=map(int, input().split())
print(a * b // fractions.gcd(a,b) )
import collections
import math

N = int(input())
A = list(map(int, input().split()))
c = collections.Counter(A)
cnt = 0
ansx = []
ansy = []
ansy2 = []

for x, y in c.items():
    sumall += (y*(y-1)//2)
    ansy2.append(y-1)
    ansx.append(x)

for i in A:
    print(sumall - ansy2[ansx.index(i)])


### FIXED CODE ###

import collections
import math

N = int(input())
A = list(map(int, input().split()))
c = collections.Counter(A)
cnt = 0


sumall = 0
for x, y in c.items():
    sumall += (y*(y-1)//2)

for i in range(N):
    print(sumall - c[A[i]] + 1)
# abc109c

import math

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

x.append(X)
x.sort()
diff = [x[1]-x[0]]
for i in range(N):
    diff.append(x[i+1]-x[i])
#print(x)
#print(diff)
D = math.gcd(diff[0],diff[1])
for i in range(2,N+1):
    D = math.gcd(D,diff[i])
    #print(diff[i],D)
print(D)

### FIXED CODE ###

# abc109c

def gcd(a, b):
    if a < b:
        a, b = b, a
    r = a % b
    if r == 0:
        return b
    return gcd(r, b)

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

x.append(X)
x.sort()
diff = [x[1]-x[0]]
for i in range(N):
    diff.append(x[i+1]-x[i])

D = gcd(diff[0],diff[1])
for i in range(2,N+1):
    D = gcd(D,diff[i])
print(D)
def main():
    N, C, K = map(int, input().split())
    T = [int(input()) for _ in range(N)]
    ans = 0
    i = 0
    j = 0
    T.sort()
    if len(T) == 1:
        ans = 1
        return(ans)

    if C == 1:
        return(N)

    if C == 2:
        while True:
            if T[j] + K >= T[i+1]:
                i = i + 2
                j = i
                ans += 1
                if j == N + 1:
                    return ans
                elif j == N:
                    ans += 1
                    return ans
            elif T[j] + K < T[i+1]:
                i += 1
                j = i
                ans += 1
                if j == N-1:
                    ans += 1
                    return ans



    while True:
        if T[j] + K >= T[i+1]:
            i = i + 1
            if i == N-1:
                ans += 1
                return (ans)
            for h in range(C-2):
                if T[j] + K >= T[i+1]:
                    if h == C-3:
                        ans += 1
                        i += 2
                        j = i
                        if j >= N-1:
                            return(ans)
                        break
                    else:
                        i += 1
                        if (i+1) == N-1:
                            ans += 1
                            return(ans)
                        continue
                elif T[j] + K < T[i + 1]:
                    j = i + 1
                    i = i + 1
                    ans += 1
                    if j == N-1:
                        ans += 1
                        return(ans)
                    break

        elif T[j] + K < T[i+1]:
            ans += 1
            i += 1
            j = i
            if j == N-1:
                ans += 1
                return(ans)

print(main())


### FIXED CODE ###

def main():
    N, C, K = map(int, input().split())
    T = list(int(input()) for _ in range(N))

    T.sort()

    ans = 0
    temp = T[0]
    cnt = 1

    for i in range(1,N):
        if temp + K < T[i] or C == cnt:
            ans += 1
            temp = T[i]
            cnt = 1
        else:
            cnt += 1

    ans += 1
    return (ans)

print(main())
a,b=map(int,input().split())
print(b+100*max(10-a,0)

### FIXED CODE ###

a,b=map(int,input().split())
print(b+100*max(10-a,0))
l=int(input())
x=l/3
#print((l/3)**3)
print(f"{x*x*x:0.6f}")



### FIXED CODE ###

l=float(input())

x=l/3
print((l/3)**3)
#print(f"{x*x*x:0.6f}")
N = int(input())
d = []
for i in range(N):
    d.add(int(input()))
print(len(set(d)))


### FIXED CODE ###

N = int(input())
d = []
for i in range(N):
    d.append(int(input()))
print(len(set(d)))
import math
from sys import stdin
N,P=[int(x) for x in stdin.readline().rstrip().split()]
for i in reversed(range(round(math.pow(P,(1/N)))):
    tmp=math.pow(i,N-1)
    if P==1:
        ans=1
        break
    if N==1:
        ans=P
        break
    if (P/i)%tmp==0:
        ans=i
        break
print(ans)

### FIXED CODE ###

import math
from sys import stdin
N,P=[int(x) for x in stdin.readline().rstrip().split()]
for i in reversed(range(round(math.pow(P,(1/N)))+1)):
    tmp=math.pow(i,N)
    if P==1:
        ans=1
        break
    if N==1:
        ans=P
        break
    if P%tmp==0:
        ans=i
        break
print(ans)
n = int(input())
s = list(str(input()))
a = 0
b = 0
for i in range(n):
  if s[i] == ".":
    a += 1
  else:
    break
for i in range(n):
  if s[-i-1] =="#":
    b += 1
  else:
    break
sb = s.count("#")
sw = s.count(".")
if sb-b>sw-a:
  print(sw-a)
else:
  print(sb-b)

### FIXED CODE ###

a,b,c = map(int,input().split())
if (a>c>b):
  print("Yes")
elif(b>c>a):
  print("Yes")
else:
  print("No")
import numpy as np
from math import factorial

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

dic = {}
after = {}

newdata = np.unique(A)
for i in range(len(newdata)):
	x = np.sum(A == newdata[i])
	if x <= 1:
		dic[newdata[i]] = 0
	else:
		dic[newdata[i]] = factorial(x) / factorial(2) / factorial(x - 2)

	if x - 1 <= 1:
		after[newdata[i]] = 0
	else:
		after[newdata[i]] = factorial(x - 1) / factorial(2) / factorial(x - 1 - 2)

numsum = 0
for dicv in dic.values():
	numsum += dicv 


for i in range(N):
	print(int(numsum - dic[A[i]] + after[A[i]]))



### FIXED CODE ###

import numpy as np
import collections

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

dic = {}
after = {}

l = collections.Counter(A)

for key, val in l.items():
	dic[key] = val * (val - 1) // 2
	after[key] = (val - 1) * (val - 2) // 2

numsum = sum(dic.values())

ans = {}
for key in dic.keys():
	ans[key] = numsum - dic[key] + after[key]

for i in range(N):
	print(ans[A[i]])
N, M = map(int, input().split())
AB = list(map(int, input().split()) for _ in range(N))

sorted_ab = sorted(AB)
cost = 0
while M > 0:
    for i in range(N):
        for j in range(sorted_ab[i][1]):
            M -= 1
            cost += sorted_ab[i][0]
print(cost)

### FIXED CODE ###

N, M = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]

AB.sort()
cost = 0
for i in range(N):
    M -= AB[i][1]
    cost += AB[i][1]*AB[i][0]
    if M<=0:
        store_num = i
        break
if M<0:
    m = abs(M)
    cost -= m*AB[store_num][0]
print(cost)
N = int(input())

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

ans = []
[ans.append(j+1) for i, j in enumarate(A)]
print(*ans)

### FIXED CODE ###

N = int(input())

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

ans = [0]*N
for i,j in enumerate(A):
    ans[j-1]=i+1
print(*ans)
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for _ in range(j)] for _ in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from itertools import accumulate #list(accumulate(A))

N, K = mi()
S = input()

len_list = [0]*(10**5+10)
ind = 0
if S[0] == '0':
    len_list[0] = 0
    ind += 1

cnt = 1
for i in range(1, N):
    if S[i] != S[i-1]:
        len_list[ind] = cnt
        ind += 1
        cnt = 1
    else:
        cnt += 1
len_list[ind] = cnt

#print(len_list[:30])
i = 0
wa = 0
sum_l = sum(len_list[:2*K+1])
while True:
    if len_list[i+2*K+1] != 0:
        wa = max(wa, sum_l)
    else:
        wa = max(wa, sum_l)
        break
    sum_l -= (len_list[i] + len_list[i+1])
    sum_l += (len_list[i+2*K+1] + len_list[i+2*K+2])
    i += 2
print(wa)


        



### FIXED CODE ###

import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for _ in range(j)] for _ in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from itertools import accumulate #list(accumulate(A))

N, K = mi()
S = input()
inds = [[0, 0]]

flag = 0
s = 0
for i in range(N):
    if S[i] == '0':
        if not flag:
            flag = 1
            inds.append([s, i-1])
    else:
        if flag:
            s = i
        flag = 0
if flag:
    inds.append([N-1, N-1])
if not flag:
    inds.append([s, N-1])
#print(inds)
l_inds = len(inds)
wa = 0
if K >= l_inds-1:
    print(N)
    exit()
for i in range(l_inds-K):
    wa = max(inds[i+K][1] - inds[i][0] + 1, wa)

print(wa)
def makelist(n, m):
    return [[0 for i in range(m)] for j in range(n)]

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

def checker(n): # int => int list
    s = format(n, 'b')
    l = len(s)
    res = [0]*l
    for i in range(l):
        if i == l - 1:
            hoge = n // 4
            if n == hoge + 1 or n == hoge + 2:
                res[i] = 1
        else:
            if s[i] == "1":
                res[i] = (int(s[i+1:], 2) + 1) % 2
    return res

a = checker(A-1) if A > 0 else "0"
b = checker(B)

if len(a) < len(b):
    tmp = a
    a = b
    b = tmp

b = [0 for _ in range(len(a) - len(b))] + b

ans = ""
for i in range(len(a)):
    ans += str(a[i] | b[i])
ans = int(ans, 2)
print(ans)


### FIXED CODE ###

def makelist(n, m):
    return [[0 for i in range(m)] for j in range(n)]

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

def checker(n): # int => int list
    s = format(n, 'b')
    l = len(s)
    res = [0]*l
    for i in range(l):
        if i == l - 1:
            hoge = n // 4
            if n == hoge * 4 + 1 or n == hoge * 4 + 2:
                res[i] = 1
        else:
            if s[i] == "1":
                res[i] = (int(s[i+1:], 2) + 1) % 2
    return res

a = checker(A-1) if A > 0 else [0]
b = checker(B)

if len(a) < len(b):
    tmp = a
    a = b
    b = tmp

b = [0 for _ in range(len(a) - len(b))] + b

ans = ""
for i in range(len(a)):
    ans += str(a[i] ^ b[i])
ans = int(ans, 2)
print(ans)
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
C=[1]
if 1 in a:
	C.append(0)
else:
	C.append(1)
for i in range(2,n+1):
	if i in a:
		C.append(0)
	else:
		c=C[i-1]+C[i-2]
		C.append(c)
print(c%(10**9+7))

### FIXED CODE ###

n,m=map(int,input().split())
l=[1 for i in range(n+1)]
for i in range(m):
    s=int(input())
    l[s]=0
if n!=1:
    for i in range(2,n+1):
        if l[i]!=0:
            a=max(1,l[i-2]) if l[i-2]!=0 else 0
            b=max(1,l[i-1]) if l[i-1]!=0 else 0
            l[i]=a+b
print(l[n]%(10**9+7))
n, x = [int(i) for i in input().split()]
l = [int(i) for i in input().split()]

d = 0
count = 0
for i in l:
    if d > x:
        break
    count += 1
    d += i

print(count

### FIXED CODE ###

n, x = [int(i) for i in input().split()]
l = [int(i) for i in input().split()]

d = 0
count = 0
for i in l:
    if d > x:
        break
    count += 1
    d += i

if d <= x:
    count += 1
print(count)
A=int(input())
B=int(input())
C=int(input())
while A<1 or A>100 or B<1 or B>100 or C<1 or C>100:
	A=int(input())
    B=int(input())
    C=int(input())
D=B//A-C
if D>0:
  print(C)
else:
  print(B//A)

### FIXED CODE ###

A,B,C=map(int,input().split())
D=B//A-C
if D>0:
  print(C)
else:
  print(B//A)
import math

N = int(input())
S = []
kaisuu = []
solution = []
index = 0

for i in range(N):
  tmp = input()
  
  if (tmp in S) == False:
    S.append(tmp)
    kaisuu.append(1)
    index += 1
  
  if (tmp in S) == True:
    index_tmp = S.index(tmp)
    kaisuu[index_tmp] += 1
  
max_ = max(kaisuu)

for i in range(N):
  if kaisuu[i] == max_:
    solution.append(S[i])
    
solution.sort()

for i in solution:
  print(i)

### FIXED CODE ###

import collections

N = int(input())
solution = []
S = []

for i in range(N):
  tmp = input()
  S.append(tmp)
  
c = collections.Counter(S)

d = c.most_common()

max_ = d[0][1]

for i,k in enumerate(d):
  if d[i][1] == max_:
    solution.append(d[i][0])
    
solution.sort()

for i in solution:
  print(i)
n = int(input())
print(Decimal(n / 2))

### FIXED CODE ###

n = int(input())
ans = 0
if n % 2 ==  0:
    ans = int(n / 2)
else: 
    ans = int(n / 2) + 1

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

a = int(A)
b = B

print(int(a * b))

### FIXED CODE ###

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

a = int(A)
b = round(B * 100)

print(a * b // 100)
import sys
a, b, k = map(int, input().split())
c = 0
for i in range(min(a, b)):
  if a % i == 0 and b % i == 0:
    c += 1
  if c == k:
    print(a)
    sys.exit(0)

### FIXED CODE ###

a, b, k = map(int, input().split())
c = [i for i in range(1, min(a, b) + 1) if a % i == 0 and b % i == 0]
print(c[-k])
import numpy as np

def main():
    n_num, m_num = map(int, input().split())
    road = np.zeros((n_num, n_num), dtype='int32')

    for _ in range(m_num):
        a, b = map(int, input().split())
        if a > b:
            a, b = b, a
        road[a-1][b-1] = 1

    city_info = np.zeros(n_num, dtype='int32')
    land_city = 0

    def move(a, b):
        if a > b:
            a, b = b, a
        if road[a-1][b-1] == 1:
            return 1
        else:
            return 0

    def recr(c):
        city_info[c] = 1
        for n in range(n_num):
            if city_info[n] == 0:
                if move(c, n) == 1:
                    recr(n)

    for n in range(n_num):
        if city_info[n] == 0:
            land_city += 1
            recr(n)

    print(land_city - 1)


if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys

sys.setrecursionlimit(100000)

import numpy as np


def main():
    n_num, m_num = map(int, input().split())
    # road = np.zeros((n_num, n_num), dtype='int32')
    c_map = []
    for _ in range(n_num):
        c_map.append([])
    # print(c_map)

    for _ in range(m_num):
        a, b = map(int, input().split())
        if a > b:
            a, b = b, a
        # road[a-1][b-1] = 1
        c_map[a-1].append(b-1)
        c_map[b-1].append(a-1)
    # print(c_map)

    city_info = np.zeros(n_num, dtype='int32')
    land_city = 0

    def move(a, b):
        if a in c_map[b]:
            return 1
        else:
            return 0

    def recr(c):
        city_info[c] = 1
        for n in c_map[c]:
            if city_info[n] == 0:
                if move(c, n) == 1:
                    recr(n)

    for n in range(n_num):
        if city_info[n] == 0:
            land_city += 1
            recr(n)
    # print(c_map)
    # print(city_info)
    print(land_city - 1)


if __name__ == '__main__':
    main()