Harryxun/stf_run huggingface dataset:
N = int(input())
l = [0] * N


x = 1
y = 1
z = 1

ans = 6
first_judge = 1
ans_out = 0
#print("ans 6")

if N <= 5:
    for i in range(N):
        print(l[i])
else:
    while ans <= N:
        print("x,y,z=",x,y,z)
        ans = (x + y + z)**2 - (x*y+ y*z + z*x)
        # print("ans",ans)
        if first_judge == 1 and ans > N:
            if ans_out >= 2:
                # print("break!")
                break
            else:
                x += 1
                y = x
                z = x
                ans_out += 1
                first_judge = 1
                ans = 0
                # print("x_++ x,y,z=",x,y,z)
                # print("first_judge=1")
                # print("ans_out=",ans_out)
        elif ans <= N:
            ans_out = 0
            if x==y==z:
                # print("x=y=z!")
                # print("first_judge=0")
                l[ans-1] += 1
                first_judge = 0
            elif x==y or y==z or Z==x:
                # print("list in")
                # print("first_judge=0")
                l[ans-1] += 3
                first_judge = 0
            else:
                l[ans-1] += 6
                first_judge = 0
            z += 1
        else:
            y += 1
            z = y
            first_judge = 1
            ans_out += 1
            ans = 0
            # print("kousin x,y,z=",x,y,z)
            # print("first_judge=1")
            # print("ans_out=",ans_out)
            
        # print("\n")
        
    for i in range(N):
        print(l[i])

### FIXED CODE ###

N = int(input())
l = [0] * N


x = 1
y = 1
z = 1

ans = 6
first_judge = 1
ans_out = 0
#print("ans 6")

if N <= 5:
    for i in range(N):
        print(l[i])
else:
    while ans <= N:
        # print("x,y,z=",x,y,z)
        ans = (x + y + z)**2 - (x*y+ y*z + z*x)
        # print("ans",ans)
        if first_judge == 1 and ans > N:
            if ans_out >= 2:
                # print("break!")
                break
            else:
                x += 1
                y = x
                z = x
                ans_out += 1
                first_judge = 1
                ans = 0
                # print("x_++ x,y,z=",x,y,z)
                # print("first_judge=1")
                # print("ans_out=",ans_out)
        elif ans <= N:
            ans_out = 0
            if x==y==z:
                # print("x=y=z!")
                # print("first_judge=0")
                l[ans-1] += 1
                first_judge = 0
            elif x==y or y==z or z==x:
                # print("list in")
                # print("first_judge=0")
                l[ans-1] += 3
                first_judge = 0
            else:
                l[ans-1] += 6
                first_judge = 0
            z += 1
        else:
            y += 1
            z = y
            first_judge = 1
            ans_out += 1
            ans = 0
            # print("kousin x,y,z=",x,y,z)
            # print("first_judge=1")
            # print("ans_out=",ans_out)
            
        # print("\n")
        
    for i in range(N):
        print(l[i])
import sys
if sys.argv[-1] == 'ONLINE_JUDGE':
    import os, zlib, base64
    open('solve.pyx', 'wb').write(zlib.decompress(base64.b85decode("c${rg?P`QD5d7~`ER=Fu@8pF3DAIcpIZBMHw=|bXvi9iPcTKFlmIf4eW_H|<JU~x@XC@OGFv^az8u6sdG8??Rf}u`NQx%Xw({*y5LB4-+AE?>+jZWc@q6*xT+vpKlUzFd&<jL}obo!Go&Q@+hukO8i^f<_4HG&E$Tr#mo?eU716Rb1c;{akPsWvabx{*wift-!$_MqVe$B5o8WDx2kSxzU^TASn_;Q3{vXb|=ljtz7k)%%8PC{OZwg8B$0bP@N+v$t?pkQL)t)E+3I#@X>(k*3uy&>56S?}6MF*&yQ}F#<2UK|vZ&ZEErW^;t4jS6Rzy69n9%ygk%=u;=2Bsv=&8P5jSKVl%{xQ)S!@{afc|+vln!vD&)N<4SVkrJBgeIHE}6#L0FRzK9ITpz4$#DzX7Rua@aL<hw`H?_^O$_66`A&C>")))
    os.system('cythonize -i -3 -b solve.pyx')
import solve

### FIXED CODE ###

root=lambda x:x if par[x]==x else root(par[x])
same=lambda x,y:root(x)==root(y)
def unite(*z):
  x,y=map(root,z)
  if x!=y:
    if rank[x]<rank[y]:
      par[x]=y
      size[y]+=size[x]
    else:
      par[y]=x
      size[x]+=size[y]
      if rank[x]==rank[y]:rank[x]+=1
n,*a=map(int,open(0).read().split())
*par,=range(n)
rank=[1]*n
size=[1]*n
b=[0]*n
for i,t in enumerate(a):b[t-1]=i
c=0
for k in b[::-1]:
  l=r=1
  if k>0 and a[k-1]>a[k]:
    l+=size[root(k-1)]
    unite(k-1,k)
  if k+1<n and a[k+1]>a[k]:
    r+=size[root(k+1)]
    unite(k+1,k)
  c+=l*r*a[k]
print(c)
a,b,c = map(int,input().split("/"))
if a >=2019 && b >= 5:
    print('TBD')
else:
    print('Heisei')

### FIXED CODE ###

a,b,c = map(int,input().split("/"))
if a >=2019 and b >= 5:
    print('TBD')
else:
    print('Heisei')
N= int(input())
count=0
for i in range(N):
  p,q=map(int,input().split(' '))
  if p==q:
    count+=1
	else:
    count=0

if count>=3:
  print('Yes')
else:
  print('No')
		


### FIXED CODE ###

N= int(input())
count=0
for i in range(N):
  p,q=map(int,input().split(' '))
  if count<3:
    if p==q:
      count+=1
    else:
      count=0
  else:
    pass

if count>=3:
  print('Yes')
else:
  print('No')
import math
a,b=map(int,input().split())
ans = a*b//(math.gcd(a,b))
print(ans)

### FIXED CODE ###

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

A,B,H,M = map(int,input().split())
MM = 6*M #分針の角度
HH = H*30 + M//2
rad = MM-HH
cosine = math.cos(math.radians(rad))

r = math.sqrt(A**2+B**2-2*A*B*cosine)
print(r)

### FIXED CODE ###

N = str(input())

if(N[-1]=="3"):
    print("bon")
    
if(N[-1]=="0" or N[-1]=="1" or N[-1]=="6" or N[-1]=="8"):
    print("pon")
    
if(N[-1]=="2" or N[-1]=="4" or N[-1]=="5" or N[-1]=="7" or N[-1]=="9"):
    print("hon")
N = int(input())
s = [input() for i in range(5)]
s_min = min(s)

print(N//s_min + 5)

### FIXED CODE ###

import math
N = int(input())
s = [input() for i in range(5)]
s = [int(i) for i in s]
s_min = min(s)
time = math.ceil(N/s_min) + 4
print(time)
n,k=map(int,input().split())
a=list(map(int,input().split()))
a.insert(0,0)
#print(a)
count=[0,a[1]]
#print(count)
for i in range(2,k+1):
    if a[count[i-1]] in count:
        count.append(a[count[i-1]])
        break
    count.append(a[count[i-1]])
count.pop(0)
#print(count)
f=count.index(count[-1])
d=len(count)-1-f
#print(f,d)
k-=f
k%=d
#print(k)
#print(count[f+k])
if k!=0:
    print(count[f+k-1])
else:
    print(count[f+d-1])

### FIXED CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
visited={}
for i in range(1,n+1):
    visited[i]=-1
l=[1]
visited[1]=0
i=1
while True:
    if visited[a[l[i-1]-1]]==0:
        roop_start=l.index(a[l[i-1]-1])
        break
    visited[a[l[i-1]-1]]=0
    l.append(a[l[i-1]-1])
    i+=1
roop_dif=i-roop_start

if k<roop_start:
    print(l[k])
else:
    k-=roop_start
    k%=roop_dif
    print(l[roop_start+k])
def f(words):
	seen = set([words[0]])
	p = words[0]
	for w in words[1:]:
		if w in seen or p[-1] != w[0]: return False
		p = w
		seen.add(w)
		return True

print 'Yes' if f([raw_input() for _ in range(int(raw_input())]) else 'No'


### FIXED CODE ###

def f(words):
	seen = set([words[0]])
	p = words[0]
	for w in words[1:]:
		if w in seen or p[-1] != w[0]: return False
		p = w
		seen.add(w)
	return True

print 'Yes' if f([raw_input() for _ in range(int(raw_input()))]) else 'No'
from statistics import mean, median,variance,stdev
data=[]
while True:
    data.append(input().split())
    if ["0"] in data:
        break
data=data[:-1]
data_i=[]
def a():
    
for i in data:
    data_i.append(list(map(lambda i:int(i),i)))
for i in data_i:
    if len(i)==1:
        pass
    else:
        print(statistics.pstdev(i))



### FIXED CODE ###

from statistics import pstdev
while input()!="0":
    lst=map(int,input().split())
    print(pstdev(lst))
a = int(input())
b = int(input())
if a*b % 2 == 0:
  print('Even')
else:
  print('Odd')

### FIXED CODE ###

a, b = map(int, input().split())
if a * b % 2 == 0:
  print('Even')
else:
  print('Odd')
"""
偶数番目、機数番目をそれぞれリストに格納
偶数番目の中で、（全て）ー（もっとも要素数が多い数の数）
機数番目の中で、（全て）ー（もっとも要素数が多い数の数）
この和を求めれば良い
→一部WA
→ちょうど2種類ではなく、1種類になってしまうことがあるからでは？

偶数群と奇数群で、最頻値で場合わけ
一致している場合とそうでない場合で計算を変える

"""
import collections


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

even = []
odd = []
for nn in range(n):
    if nn % 2 == 0:
        even.append(V[nn])
    else:
        odd.append(V[nn])

e = collections.Counter(even).most_common()
o = collections.Counter(odd).most_common()

if e[0][0] != o[0][0]:
    print(n - e[0][1] - o[0][1])
elif e[0][0] == n // 2 and o[0][0] == n // 2:
    print(n // 2)
elif e[0][0] == n // 2 and o[0][0] < n // 2:
    print(n - o[0][1])
elif e[0][0] < n // 2 and o[0][0] == n // 2:
    print(n - e[0][1])
else:
    print(n - max(e[1][1] + o[0][1], e[0][1] + o[1][1]))



### FIXED CODE ###

import collections
n = int(input())
V = list(map(int, input().split()))

even = []
odd = []
for nn in range(n):
    if nn % 2 == 0:
        even.append(V[nn])
    else:
        odd.append(V[nn])

e = collections.Counter(even).most_common()
o = collections.Counter(odd).most_common()

if e[0][0] != o[0][0]:
    print(n - e[0][1] - o[0][1])
else:
    if len(e) == 1 and len(o) == 1:
        print(n // 2)
    elif len(e) == 1 and len(o) >= 2:
        print(n - o[0][1])
    elif len(e) >= 2 and len(o) == 1:
        print(n - e[0][1])
    else:
        print(n - max(e[1][1] + o[0][1], e[0][1] + o[1][1]))
N,M=map(int,input().split())

def saiki(m,box,ans):
    if m==M:
        if sum(box)==len(box):
            return ans
        else:
            return 10**18
    else:
        open=box[:]
        for item in l[m][1]:
            open[item]=1
        return min(saiki(m+1,box,ans),saiki(m+1,open,ans+l[m][0]))


l=[]
for _ in range(M):
    a,b=map(int,input().split())
    temp=list(map(lambda x: int(x)-1,input().split()))
    l.append([a,temp])

ans=saiki(0,[0]*N,0)

print(ans if ans!=10**18 else -1)




### FIXED CODE ###

# coding: utf-8
# Your code here!
# coding: utf-8
# Your code here!
N,M=map(int,input().split())

dp=[10**9]*2**N

dp[0]=0

for _ in range(M):
    a,b=map(int,input().split())
    c=list(map(int,input().split()))
    cl=["0"]*N
    for item in c:
        cl[item-1]="1"
    plus=int(str("".join(cl)),2)
    for i in range(len(dp))[::-1]:
        if dp[i]!=10**9:
            #print(i,i|plus)
            dp[i|plus]=min(dp[i|plus],dp[i]+a)
if dp[-1]!=10**9:
    print(dp[-1])
else:
    print(-1)
# -*- coding: utf-8 -*-

T = 0
F = 2
C = 4

s = input()
q = int(input())

cnt = 0

front = ""
back = ""

for i in range(q):
    query = input()

    if query[T] == "1":
        cnt += 1
        continue

    # モード通常
    if cnt % 2 == 0:
        if query[F] == "1":
            front =  query[C] + front
        else:
            back = query[C] + back

    # モード反転
    else:
        if query[F] == "1":
            back = query[C] + back
        else:
            front =  query[C] + front


# print(cnt)
# print(front)
# print(s)
# print(back)

moji = front+s+back

if cnt % 2 == 0:
    # print(s)
    pass
else:
    moji = moji[::-1]
    # print(s[::-1])

# front = front[::-1]

# print(front,s,back)

print(moji)


### FIXED CODE ###

s = input()

a = False
for i in range(len(s)):
    if s[i] == "A":
        a = True
        break

b = False
for i in range(len(s)):
    if s[i] == "B":
        b = True
        break

if a and b:
    print("Yes")
else:
    print("No")
N,A,B=input().split(",")
if (N*A) > B
  print (B)
else:
  print(N*A)


### FIXED CODE ###

N,A,B=map(int,input().split())
if N*A >=B:
  print (B)
else:
  print(N*A)
N, Q = map(int, input().split())
S = input()
t=[0]*(N+1)
for i in range(N):
    t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)
for i in range(Q):
    l, r = map(int, input().split())
    print(t[r-1] - t[l-1])  

### FIXED CODE ###

b = input()

if b == 'A':
    print('T')
if b == 'C':
    print('G')
if b == 'G':
    print('C')
if b == 'T':
    print('A')
N, T = map(int, input().split())
ans = 1001
for i in range(N):
    cost, tm = map(int, input().split())
    if tm <＝ T:
        ans = min(ans, cost)
if ans == 1001:
    ans = "TLE"
print(ans)

### FIXED CODE ###

n, l = map(int, input().split())
ans = 1001
for i in range(n):
    c, t = map(int, input().split())
    if t <= l:
        ans = min(ans, c)
if ans == 1001:
    ans = "TLE"
print(ans)
# -*- coding: utf-8 -*-
# abc151/abc151_c
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N, M = i2nn()
    wa_list = [0] * N
    penalty = 0
    ac = 0
    for _ in range(M):
        p, S = i2s().split(' ')
        p = int(p)
        if wa_list[p] >= 0:
            if S == 'WA':
                wa_list[p] += 1
            else:
                penalty += wa_list[p]
                wa_list[p] = -1
                ac += 1
    print(ac, penalty)
    return

main()


### FIXED CODE ###

# -*- coding: utf-8 -*-
# abc151/abc151_c
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N, M = i2nn()
    wa_list = [0] * N
    penalty = 0
    ac = 0
    for _ in range(M):
        p, S = i2s().split(' ')
        p = int(p) - 1
        if wa_list[p] >= 0:
            if S == 'WA':
                wa_list[p] += 1
            else:
                penalty += wa_list[p]
                wa_list[p] = -1
                ac += 1
    print(ac, penalty)
    return

main()
import sys
sys.setrecursionlimit(100000)

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

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

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

def lcm_li(li):
    if len(li) == 2:
        return lcm(li[0], li[1])
    else:
        x = lcm(li[0], li[1])
        x = [x] + li[2:]
        return lcm_li(x)

print(lcm_li(T))

### FIXED CODE ###

import sys
sys.setrecursionlimit(100000)

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

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

lcm = 1
for i in T:
    lcm = int(lcm * i // gcd(lcm, i))

print(lcm)
a=str(input())
b=str(input())

n=a+b
 
for i in range(int(n)//2):
  if i**2==int(n):
    ans="Yes"
    break
  else:
    ans="No"
print(ans)

### FIXED CODE ###

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

n=a+b
 
for i in range(int(n)//2):
  if i**2==int(n):
    ans="Yes"
    break
  else:
    ans="No"
print(ans)
N = int(input())
nums = list(map(int, input().split()))
count = 0
max_count = 0
right = 0
while True:
    if nums[right+1] <= nums[right]:
        count +=1
        right += 1
    else:
        count = 0
        right += 1
        
    if max_count < count:
        max_count = count
    
    if right == N-1:
        break
    
print(max_count)

### FIXED CODE ###

N = int(input())
nums = list(map(int, input().split()))
count = 0
max_count = 0
right = 0
while True:
    if right == N-1:
        break
    
    if nums[right+1] <= nums[right]:
        count += 1    
    else:
        count = 0
        
    if max_count < count:
        max_count = count
        
    right += 1
    
print(max_count)
zimport sys
import time
#from collections import deque, Counter, defaultdict
#from fractions import gcd
#import bisect
#import heapq
import math
start=time.time()
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))
a,b = rl()
c=a%4
d=b%4
ans=0
for i in range(4-c):
    ans^=a+i
for i in range(d+1):
    ans^=b-i
print(ans)

### FIXED CODE ###

import sys
import time
#from collections import deque, Counter, defaultdict
#from fractions import gcd
#import bisect
#import heapq
import math
start=time.time()
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))
a,b = rl()
c=a%4
d=b%4
ans=0
for i in range(4-c):
    ans^=a+i
for i in range(d+1):
    ans^=b-i
print(ans)
import math
n,x = map(int,input().split())
xlist= list(map(int,input().split()))
ans=x-xlist[0]
for i in xlist:
    ans=math.gcd(ans,x-i)
print(ans)

### FIXED CODE ###

def gcd(a,b):
    a=abs(a)
    b=abs(b)
    if a<b:
        c=a
        a=b
        b=c
    if a%b==0:
        return b
    else:
        return gcd(b,a%b)
n,x = map(int,input().split())
xlist= list(map(int,input().split()))
ans=x-xlist[0]
for i in xlist:
    ans=gcd(ans,x-i)
print(ans)
f=lambda:map(int,input().split())
N,M=f()
N+=1;V=[-1]*N
Q=list(range(N))
F,B=eval('{i:[]for i in Q},'*2)
for i in Q:x,y=f();F[x]+=[y];B[y]+=[x]
while Q:
 p=Q.pop();S=[1+V[q]for q in B[p]]
 if all(S)and V[p]<0:V[p]=max(S+[0]);Q+=F[p]
print(max(V))

### FIXED CODE ###

from collections import defaultdict
debug = print
def debug(*va): pass

def longest_by_topological_sort(N, nexts, prevs):
    visited = [-1] * N
    max_dist = 0
    que = list(range(N))
    while len(que):
        p = que.pop()
        if visited[p] == -1:
            if all(visited[q] != -1 for q in prevs[p]):
                dist = 0
                for q in prevs[p]:
                    dist = max(dist, visited[q] + 1)
                visited[p] = dist
                max_dist = max(max_dist, dist)
                for n in nexts[p]:
                    que.append(n)
    return max_dist

def test_separate():
    import time
    N = 10**5
    t0 = time.time()
    print(longest_by_topological_sort(N, defaultdict(list), defaultdict(list)))
    print('elapsed', time.time() - t0)

def test_fanout():
    import time
    N = 10**5
    nn, pp = defaultdict(list), defaultdict(list)
    for i in range(1, N):
        nn[0].append(i)
        pp[i].append(0)
    t0 = time.time()
    print(longest_by_topological_sort(N, nn, pp))
    print('elapsed', time.time() - t0)

def test_middle():
    import time
    N = 10**5
    nn, pp = defaultdict(list), defaultdict(list)
    for i in range(1, N):
        # fanout
        nn[0].append(i)
        pp[i].append(0)
        # fanin
        nn[i].append(1)
        pp[1].append(i)
    t0 = time.time()
    print(longest_by_topological_sort(N, nn, pp))
    print('elapsed', time.time() - t0)

if __name__ == '__main__':
    N, M = map(int, input().split())

    nextnodes = [defaultdict(list), defaultdict(list)]
    for i in range(M):
        x, y = map(int, input().split())
        nextnodes[0][x - 1].append(y - 1)
        nextnodes[1][y - 1].append(x - 1)

    max_dist = longest_by_topological_sort(N, nextnodes[0], nextnodes[1])
    print(max_dist)
import queue
n=int(input())
s=input()
q=queue.Queue(s)
def br(a):
  for i in range(1,len(a)+1):
    if a[:i].count("(")<a[:i].count(")"):
      return ")"
  if a.count("(")==a.count(")"):
    return "0"
  else:
    return "("
for i in range(1,len(s)+1):
  if s[:i].count("(")<s[:i].count(")"):
    s.append("(")
  

### FIXED CODE ###

from collections import deque
n=int(input())
s = input()
cnt = [0]
ans = deque(list(s))
for i in range(n):
  if s[i]=="(":
    cnt.append(cnt[-1]+1)
  else:
    cnt.append(cnt[-1]-1)
rt = min(cnt)
if rt<0:
  ans.extendleft("("*(-rt))
if cnt[-1]-rt>0:
  ans.extend(")"*(cnt[-1]-rt))
print(*ans,sep="")
from collections import Counter

n = int(input().strip())
vs = list(map(int, input().strip().split()))
oddv = [v for i, v in enumerate(vs) if i % 2 == 0]
evenv = [v for i, v in enumerate(vs) if i % 2 == 1]

oddc = Counter(oddv)
evenc = Counter(evenv)
if oddc.most_common(1)[0][0] != evenc.most_common(1)[0][0]:
  print(len(oddv) - oddc.most_common(1)[0][1] + len(evenv) - evenc.most_common(1)[0][1])
else:
  if len(oddc.most_common()) == 1 and len(evenc.most_common()) == 1:
    print(len(oddv))
  elif len(oddc.most_common()) == 1:
    print(len(evenv) - evenc.most_common(2)[1][1])
  else len(evenc.most_common()) == 1:
    print(len(oddv) - oddc.most_common(2)[1][1])
  else:
    print(min(len(oddv) - oddc.most_common(2)[1][1] + len(evenv) - evenc.most_common(1)[0][1], len(oddv) - oddc.most_common(1)[0][1] + len(evenv) - evenc.most_common(2)[0][1]))

### FIXED CODE ###

from collections import Counter

n = int(input().strip())
vs = list(map(int, input().strip().split()))
oddv = [v for i, v in enumerate(vs) if i % 2 == 0]
evenv = [v for i, v in enumerate(vs) if i % 2 == 1]

oddc = Counter(oddv)
evenc = Counter(evenv)
if oddc.most_common(1)[0][0] != evenc.most_common(1)[0][0]:
  print(len(oddv) - oddc.most_common(1)[0][1] + len(evenv) - evenc.most_common(1)[0][1])
else:
  if len(oddc.most_common()) == 1 and len(evenc.most_common()) == 1:
    print(len(oddv))
  elif len(oddc.most_common()) == 1:
    print(len(evenv) - evenc.most_common(2)[1][1])
  elif len(evenc.most_common()) == 1:
    print(len(oddv) - oddc.most_common(2)[1][1])
  else:
    print(min(len(oddv) - oddc.most_common(2)[1][1] + len(evenv) - evenc.most_common(1)[0][1], len(oddv) - oddc.most_common(1)[0][1] + len(evenv) - evenc.most_common(2)[1][1]))
i = input()

if int(i)<0:
  print("0")

acc = 0
for j in range(len(i)//2):
  acc+=9*(10**(2*j))

if len(i)%2==0:
  print(acc)
else:
  addition = int(i[1:])+1
  print(acc+addition)

### FIXED CODE ###

i = input()

acc = 0
for j in range(len(i)//2):
  acc+=9*(10**(2*j))

if len(i)%2==0:
  print(acc)
else:

  addition = (int(i[0])-1)*10**(len(i)-1)+1
  if len(i)>1:
    addition += int(i[1:])
  print(acc+addition)
def calc(num,ans):
    if len(num)==1:
        if num[0]==ans:
            return 1
        else:
            return 0
    else:
        a=num.copy()
        x=a.pop(-1)
        if ans-x>=0 and ans+x<=20:
            return calc(a,ans-x)+calc(a,ans+x)
        elif ans-x>=0:
            return calc(a,ans-x)
        elif ans+x<=20:
            return calc(a,ans+x)
        else:
            return 0

N=int(input())
number=[int(i) for i in input().split(" ")]
a=number.pop(-1)
print(calc(number,a))

### FIXED CODE ###

N=int(input())
number=[int(i) for i in input().split(" ")]
a=number.pop(-1)

if number[0]==0:
    N-=1
    number.pop(0)


numbermap=[[0 for i in range(21)] for j in range(N)]

numbermap[0][0]=1

for i in range(N-1):
    for j in range(21):
        if j+number[i]<=20:
            numbermap[i+1][j+number[i]]+=numbermap[i][j]
        if j-number[i]>=0:
            numbermap[i+1][j-number[i]]+=numbermap[i][j]



print (numbermap[-1][a])
s = input()
if s == 'Sun':
  s = 0
elif s == 'MON':
  s = 1
elif s == 'TUE':
  s = 2
elif s == 'WED':
  s = 3
elif s =='THU':
  s = 4
elif s == 'FRI':
  s = 5
elif s == 'SAT':
  s = 6
print(int(s) - 0)

### FIXED CODE ###

s = input()
if s == 'SUN':
  s = 7
elif s == 'MON':
  s = 6
elif s == 'TUE':
  s = 5
elif s == 'WED':
  s = 4
elif s =='THU':
  s = 3
elif s == 'FRI':
  s = 2
elif s == 'SAT':
  s = 1
print(s)
#!/usr/bin/env python3
import sys


def solve(S: int, K: int):
    HOGE = 5000000000000000
    for c in S:
        if K == 0:
            ret = 1
            break
        if c == '1':
            K -= 1
        else:
            ret = c
            break
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = str(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(S, K)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys


def solve(S: int, K: int):
    for i in range(K):
        c = S[i]
        if c != '1':
            print(c)
            return
    print(1)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = str(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(S, K)

if __name__ == '__main__':
    main()
A = int(input())
B = float(input())

C = B*100
print(A * C // 100)

### FIXED CODE ###

a, b = map(str, input().split())
a = int(a)
b = int(b.replace('.', ''))
print(a*b//100)