Harryxun/stf_run huggingface dataset:
import sys
from math import factorial
from collections import Counter
from fractions import Fraction
import heapq, bisect, fractions
import math
import itertools
import numpy as np
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
MOD = 10**9 + 7

n, k = MAP()
a = LIST()


end = [n]*n

for i in range(min(k, 41)):
    b = [0]*(n+1)
    for j in range(n):
        b[max(j-a[j], 0)] +=1
        if j+a[j] <n:
            b[j+a[j]+1] -=1
    for j in range(1,n):
        b[j] += b[j-1]
    a = b[:n]

for i in range(n):
    print(str(int(a[i]))+" ",end = "" )

### FIXED CODE ###

import sys
from math import factorial
from collections import Counter
from fractions import Fraction
import heapq, bisect, fractions
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
MOD = 10**9 + 7

n, k = MAP()
a = LIST()


end = [n]*n

for i in range(min(k, 41)):
    b = [0]*(n+1)
    for j in range(n):
        b[max(j-a[j], 0)] +=1
        if j+a[j] <n:
            b[j+a[j]+1] -=1
    for j in range(1,n):
        b[j] += b[j-1]
    a = b[:n]

for i in range(n):
    print(str(int(a[i]))+" ",end = "" )
x,y = map(int,input().split())
import math

print(math.floor(x*y))

### FIXED CODE ###

from decimal import Decimal
x,y = map(str,input().split())
import math
x=int(x)
y=Decimal(y)
val_floor = math.floor(x*y)
print(int(val_floor))
import ast

def pattern(li, el, space, acc, xs):
  if len(li) != 1:
    acc.append(el)
    acc.append(space)
    al = li.pop(0)
    pattern(list(li), al, '+', list(acc), xs)
    pattern(list(li), al, '', list(acc), xs)
  else:
    acc.append(el)
    acc.append(space)
    al = li.pop(0)
    acc.append(al)
    xs.append(ast.literal_eval(''.join(acc)))

li = list(input())
el = li.pop(0)
xs = []

pattern(list(li), el, '+', [], xs)
pattern(list(li), el, '', [], xs)

print(sum(xs))

### FIXED CODE ###

import ast

def pattern(li, el, space, acc, xs):
  if len(li) != 1:
    acc.append(el)
    acc.append(space)
    al = li.pop(0)
    pattern(list(li), al, '+', list(acc), xs)
    pattern(list(li), al, '', list(acc), xs)
  else:
    acc.append(el)
    acc.append(space)
    al = li.pop(0)
    acc.append(al)
    xs.append(ast.literal_eval(''.join(acc)))

li = list(input())
el = li.pop(0)
xs = []

if len(li) != 0:
  pattern(list(li), el, '+', [], xs)
  pattern(list(li), el, '', [], xs)

if len(li) != 0:
  print(sum(xs))
else:
  print(int(el))
def anordinarygame(s):

    flag = True
    count = 0
    while flag:
        for i in range(len(s)):
            if len(s) != i and i != 0 and str(s[i-1]) != str(s[i+1]):
                count += 1
                s.pop(i)
                continue
            elif len(s) == i:
                return "Second" if count % 2 == 0 else "First"
        if len(s) < 3:
            return "Second" if count % 2 == 0 else "First"

def main():
    s = list(str(input()))
    print(anordinarygame(s))

if __name__ == '__main__':
    main()

### FIXED CODE ###

def anordinarygame(s):

    ans = ""
    if s[0] == s[-1]:
        ans = "Second" if len(s) % 2 else "First"
    else:
        ans = "First" if len(s) % 2 else "Second"

    return ans

def main():
    s = list(str(input()))
    print(anordinarygame(s))

if __name__ == '__main__':
    main()
n,a,b = int(input().split())
ans = 0
for i in range(n+1):
    if a<= sum(list(map(int,list(str(i))))) <= b:
        ans += i:
print(ans)

### FIXED CODE ###

a,b,c,d = map(int,input().split())
if a+b>c+d:
    print('Left')
elif a+b<c+d:
    print('Right')
else:
    print('Balanced')
import sys
n,y= map(int, input().split())

for a in range(n+1):
	for b in range(n+1):
			if (a * 10000 + b * 5000 + (n-a-b) * 1000 == y):
				print(str(a) + ' ' + str(b) + ' ' + str(c))
				sys.exit()

print('-1 -1 -1')
sys.exit()

### FIXED CODE ###

import sys

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

for a in range(n+1):
	for b in range(n+1-a):
		c = n - a - b
		if (a * 10000 + b * 5000 + c * 1000 == y):
				print(str(a) + ' ' + str(b) + ' ' + str(c))
				sys.exit()
	
print('-1 -1 -1')
sys.exit()
from itertools import combinations as comb
def get_ans():
	m, n = (int(x) for x in input().split())
	if m==0 and n==0:
		quit()
	ans = 0
	for nums in comb(list(range(1, min(m,n-3)))):
		if sum(nums) == n:
			ans += 1
	print(ans)
	
while True:
	get_ans()


### FIXED CODE ###

from itertools import combinations as comb
def get_ans(m, n):
    ans = sum(1 for nums in comb(range(1, min(m+1,n-2)), 2) if ((n-sum(nums)>0) and (n-sum(nums) > max(nums)) and (n-sum(nums)<=m)))
    return ans
      
while True:
    m, n = (int(x) for x in input().split())
    if m==0 and n==0:
        quit()
    ans = get_ans(m, n)
    print(ans)
N,K = list(map(int,input().split()))
S = input()
n = []
p = S[0]
c = 1
for s in S[1:]:
    if s != p:
        n.append(c)
        p = s
        c = 0
    c+=1
n.append(c)
ans = n[0]
if S[0]=="0":
    for i in range(1,len(n)-2*K+1,2):
        ans = max(ans,sum(n[i:i+2*K+1]))
    n[1]+=n[0]
    n.pop(0)
    K -=1
for i in range(0,len(n)-2*K,2):
    ans = max(ans,sum(n[i:i+2*K+1]))
print(ans)

### FIXED CODE ###

N,K = list(map(int,input().split()))
S = input()
n = []
p = S[0]
c = 1
for s in S[1:]:
    if s != p:
        n.append(c)
        p = s
        c = 0
    c+=1
n.append(c)
ans = max(n)
sum_n = [0]
for i in n:
    sum_n.append(i+sum_n[-1])
if S[0]=="0":
    for i in range(1,len(n)-2*K+1,2):
        ans = max(ans,sum_n[min(i+2*K+1,len(sum_n)-1)]-sum_n[i])
    sum_n.pop(1)
    n.pop(0)
    K -=1
for i in range(0,len(n)-2*K+1,2):
    ans = max(ans,sum_n[min(i+2*K+1,len(sum_n)-1)]-sum_n[i])
if (len(n)-2*K+1)<=0:
    ans = max(ans,sum_n[-1])
print(ans)
c = []
for i in range(3):
    c.append([int(c) for c in input().split(' ')])
result = 'No'
for a1 in range(0, 201):
    for a2 in range(0, 201):
        for a3 in range(0, 201):
            if ((a1 - a2 == c[0][0]+c[0][1]+c[0][2]
            - c[1][0]- c[1][1] - c[1][2])
             and (a1-a3 == c[0][0]+c[0][1]+c[0][2]
             -c[2][0]- c[2][1] - c[2][2])
             and (a2 - a3 == c[1][0]+ c[1][1] + c[1][2]
             - c[2][0] - c[2][1] - c[2][2]
             )):
                result = 'Yes'
                break
print(result)

### FIXED CODE ###

n = int(input())
a = int(input())

rest = n % 500
if rest <= a :
    print('Yes')
else:
    print('No')
N  = int(input())
a = 0
for i in range(N):
    l, r = map(int, input().split())
    ans += r - l + 1
print(a)  

### FIXED CODE ###

N  = int(input())
a = 0
for i in range(N):
    l, r = map(int, input().split())
    a += r - l + 1
print(a)
# nlognの実装。駄目。
import numpy as np
from scipy.sparse.csgraph import dijkstra


def calc(d):
    if d == 1 or d == 0:
        return 0
    else:
        return int(d - 1)


delta = []
n, u, v = map(int, input().split())
Gn = np.full((n, n), float("inf"))
for i in range(n - 1):
    a, b = map(int, input().split())
    a = a - 1
    b = b - 1
    Gn[a][b] = 1
    Gn[b][a] = 1
    Gn[i][i] = 0
minimum_u = dijkstra(Gn, indices=u - 1)
minimum_v = dijkstra(Gn, indices=v - 1)
for i in range(n):
    if minimum_v[i] - minimum_u[i] > 0 and i != u - 1 and i != v - 1:
        delta.append([i, minimum_v[i]])
if delta != []:
    delta_sorted = sorted(delta, key=lambda x: x[1])
    p = delta_sorted[-1][0]
    d = int(minimum_v[p])
    print(calc(d))
else:
    print(calc(minimum_u[v - 1]))


### FIXED CODE ###

# 写経
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n, u, v = map(int, readline().split())
m = map(int, read().split())
AB = zip(m, m)

graph = [[] for _ in range(n + 1)]
for a, b in AB:
    graph[a].append(b)
    graph[b].append(a)


def dfs(v):
    dist = [-1] * (n + 1)
    # 初期化
    stack = [v]
    # 初期位置を記憶
    dist[v] = 0
    # 初期位置の距離を0に
    while stack:
        # stackの中身がなくなるまで頑張る
        v = stack.pop()
        # stackから1つ要素を取り出す
        dw = dist[v] + 1
        # その要素の周りを考えるので、距離としてはその要素の距離に1を加えたものを考える
        for w in graph[v]:
            # 考えている要素に対して隣接している点に対して
            if dist[w] >= 0:
                # もし今まで訪れたことがあったら無視
                continue
            dist[w] = dw
            # 訪れたことがなかったら距離を更新
            stack.append(w)
            # 訪れたことがないところだったらstackに訪れる点リストとして保存
    return dist


answer = 0
du, dv = dfs(u), dfs(v)
for u, v in zip(du[1:], dv[1:]):
    if v - u > 0:
        x = v - 1
        if answer < x:
            answer = x
print(answer)
a, b = map(int, input().split())
cnt = 0
for i in range(a, b+1):
  if i==''.join(reversed(i)):
    cnt+=1
print(cnt)

### FIXED CODE ###

a, b = map(int, input().split())
cnt = 0
for i in range(a, b+1):
  if str(i)==''.join(reversed(str(i))):
    cnt+=1
print(cnt)
import math
n = int(input())
#a*b=gcd(a,b)*lcm(a,b)
lcm = 2*n//math.gcd(2,n)
print(lcm)

### FIXED CODE ###

n = int(input())

if n % 2 == 0:
  print(n)
else:
  print(2 * n)
import functools
import copy

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

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

def gcd_l(l):
    return functools.reduce(lambda x, y: gcd(x, y), l)


l = [0] * N  #L_i, i = 0, 1, 2, ..., N-1
for i in range(N):
    if i == 0:
        continue
    else:
        l[i] = gcd_l(l[i-1] + A[i-1])

r = [0] * N #R_i, i = 0, 1, 2, ..., N-1
for j in range(N):
    if j == 0:
        continue
    else:
        r[N-j] = gcd_l(r[N-j] + A[N-j-1])

m = [0] * N
for i in range(N):
    m[i] = gcd(l[i], r[i])

print(max(m))


### FIXED CODE ###

import functools
import copy

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

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

l = [0] * N  #L_i, i = 0, 1, 2, ..., N-1
for i in range(N):
    if i == 0:
        continue
    else:
        l[i] = gcd(l[i-1], A[i-1])

r = [0] * N #R_i, i = 0, 1, 2, ..., N-1
for j in range(N):
    if j == 0:
        continue
    else:
        r[N-j-1] = gcd(r[N-j], A[N-j])

m = [0] * N
for i in range(N):
    m[i] = gcd(l[i], r[i])

print(max(m))
N = int(input())

sum = 0

b = 0
for i in range(1,N):
    N2 = int(N/i)
    if int(N/(N2-1)) != i:
        b += 1
        if b > 1000000:
            break
    else:
        if N%(N2-1) == i:
            sum += N2-1

print(sum)

### FIXED CODE ###

N = int(input())

ans = 0
if N > 3:
    ans += N-1

for i in range(2, int(N**0.5)+1):
    if N%i == 0:
        a = i-1
        if N//a == N%a:
            ans += a
        a = N//i-1
        if N//a == N%a:
            ans += a

print(ans)
l,r = map(int,input().split())
x = []
for i in range(l,r-1):
  for j in range(i+1,r):
    res = (i*j)%2019
    x.append(res)
print(min(x))

### FIXED CODE ###

l,r = map(int,input().split())
x = []
if r-l>2019:
  print(0)
else:
  for i in range(l,r):
    for j in range(i+1,r+1):
      res = (i*j)%2019
      x.append(res)
  print(min(x))
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    n=int(input())
    A=list(map(int,input().split()))
    dp=[[None]*(n+1) for _ in range(n+1)]

    def dfs(l,r)->NoneType:
        if(dp[l][r] is not None): return
        if(l==r):
            dp[l][r]=0
            return

        # 1個先の値を確定させておく
        dfs(l+1,r)
        dfs(l,r-1)
        turn=(n-(r-l))%2
        if(turn==0): dp[l][r]=max(dp[l+1][r]+A[l],dp[l][r-1]+A[r-1])
        else: dp[l][r]=min(dp[l+1][r]-A[l],dp[l][r-1]-A[r-1])

    dfs(0,n)
    print(dp[0][n])
resolve()

### FIXED CODE ###

import sys
sys.setrecursionlimit(2147483647)
INF = float("inf")
MOD = 10**9 + 7 # 998244353
input = lambda:sys.stdin.readline().rstrip()
from functools import lru_cache
def resolve():
    n = int(input())
    A = list(map(int, input().split()))

    dp = [[None] * (n + 1) for _ in range(n + 1)]
    for i in range(n + 1):
        dp[i][i] = 0

    for width in range(1, n + 1):
        for l in range(n):
            r = l + width
            if r > n:
                break
            turn = (n - (r - l)) & 1
            if turn & 1 == 0:
                dp[l][r] = max(A[l] + dp[l + 1][r], A[r - 1] + dp[l][r - 1])
            else:
                dp[l][r] = min(-A[l] + dp[l + 1][r], -A[r - 1] + dp[l][r - 1])


    print(dp[0][n])
resolve()
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 11 14:44:47 2018
ABC046C
@author: maezawa
"""
import math
n = int(input())
tp = 1
ap = 1
for i in range(n):
    t, a = list(map(int, input().split()))
    if ti == t and ai == a:
        continue
    ti = t
    ai = a
    nit = tp/ti
    nia = ap/ai
    ni = math.ceil(max(nit, nia))
    vi = ni*(ti+ai)
    #print(ni, vi)
    tp = ni*ti
    ap = ni*ai

print(vi)

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Sat Aug 11 14:44:47 2018
ABC046C
@author: maezawa
"""
import math
n = int(input())
tp = 1
ap = 1
for i in range(n):
    ti, ai = list(map(int, input().split()))
    #nit = math.ceil(tp/ti)
    #nia = math.ceil(ap/ai)
    nit = -tp//ti
    nia = -ap//ai
    ni = max(-nit, -nia)
    vi = ni*(ti+ai)
    #print(ni, vi)
    tp = ni*ti
    ap = ni*ai

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

if a<b-1:
print(a)

else:
print(a-1)


### FIXED CODE ###

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

if a<b+1:
     print (a)
else:
     print (a-1)
magialist=[]
datalist=[]
h,w=map(int,input().split())
#for i in range(10):
    #add=list(map(int,input().split()))
    #magialist.append(add)
add=list(map(int,input().split()))
for i in range(10):
    magialist.append(add)



for j in range(h):
    add1=list(map(int,input().split()))
    datalist.extend(add1)
 
storelist=[[[[] for i in range(10)] for i in range(10)] for i in range(10)]
    #わーシャルフロイド法
for i in range(10):
    for j in range(10):
            a=min(magialist[i][j],magialist[i][0]+magialist[0][j])
            storelist[0][i][j]=a
k=1
while k<=9:
    for i in range(10):
        for j in range(10):
                a=min(storelist[k-1][i][j],storelist[k-1][i][k]+storelist[k-1][k][j])
                storelist[k][i][j]=a
    k+=1

uselist=[]
                                                                                        
for j in range(10):
    uselist.append(storelist[9][j][1])
ans=0
for nums in range(h*w):
    
    for i in range(10):
        if datalist[nums]==-1:
            continue
        
        elif datalist[nums]==i:
            ans+=uselist[i]
print(ans)


### FIXED CODE ###

magialist=[]
datalist=[]
h,w=map(int,input().split())
for i in range(10):
    add=list(map(int,input().split()))
    magialist.append(add)

for j in range(h):
    add1=list(map(int,input().split()))
    datalist.extend(add1)
 
storelist=[[[[] for i in range(10)] for i in range(10)] for i in range(10)]
    #わーシャルフロイド法
for i in range(10):
    for j in range(10):
            a=min(magialist[i][j],magialist[i][0]+magialist[0][j])
            storelist[0][i][j]=a
k=1
while k<=9:
    for i in range(10):
        for j in range(10):
                a=min(storelist[k-1][i][j],storelist[k-1][i][k]+storelist[k-1][k][j])
                storelist[k][i][j]=a
    k+=1

uselist=[]
                                                                                        
for j in range(10):
    uselist.append(storelist[9][j][1])
ans=0
for nums in range(h*w):
        if datalist[nums]==-1:
            continue
        else:
            for j in range(10):
                if datalist[nums]==j:
                    ans+=uselist[j]
print(ans)
s = list(input())
t = list(input())
for i in range(len(s)):
   	tmp = s[-1]
   	for j in range(len(s)-1)[::-1]:
       	s[j+1] = s[j]
   	s[0]=tmp
   	print(s)
   	if s == t:
       	break
else:
   	print("no")

### FIXED CODE ###

s = list(input())
t = list(input())
for i in range(len(s)):
    tmp = s[-1]
    for j in range(len(s)-1)[::-1]:
        s[j+1] = s[j]
    s[0]=tmp
    if s == t:
        print("Yes")
        break
else:
    print("No")
a,b,k=map(int,input().split())
 
count=0
 
for i in range(1,max(a,b)+1)[::-1]
 
if a%i==0 and b%i==0:
  count+=1
  if count==k:
    print(i)

### FIXED CODE ###

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

if b//a <= c:
  print(b//a)
  
else:
  print(c)
N, M = map(int, input().split())
pS = {}
for i in range(N):
    pS[i] = [0, 0, 0]  # is_ac, penatly, AC

for i in range(M):
    p, S = input().split()
    p = int(p) - 1
    if pS[p][0] == 0 and S == 'WA':
        pS[p][1] += 1
    elif pS[p][0] == 0 and S == 'AC':
        pS[p][0] = 1
        pS[p][2] = 1

AC = 0
penatly = 0
for i in range(N):
    if pS[p][0] == 1:
        penatly += pS[int(i)][1]
        AC += pS[int(i)][2]
print(AC, penatly)


### FIXED CODE ###

N, M = map(int, input().split())
pS = {}
for i in range(N):
    pS[i] = [0, 0, 0]  # is_ac, penatly, AC

for i in range(M):
    p, S = input().split()
    p = int(p) - 1
    if pS[p][0] == 0 and S == 'WA':
        pS[p][1] += 1
    elif pS[p][0] == 0 and S == 'AC':
        pS[p][0] = 1
        pS[p][2] = 1

AC = 0
penatly = 0
for i in range(N):
    if pS[i][0] == 1:
        penatly += pS[int(i)][1]
        AC += pS[int(i)][2]
print(AC, penatly)
A, P = int( x ) for x in input().split()
print( ( A * 3 + P ) // 2 )

### FIXED CODE ###

A, P = map( int, input().split() )
print( ( A * 3 + P ) // 2 )
while True:
    (a, op, b) = input().split()
    a = int(a)
    b = int(b)

    if op = '?':
        break
    elif op = '+':
        print(a + b)
    elif op = '-':
        print(a - b)
    elif op = '*':
        print(a * b)
    elif op = '/':
        print(a // b)

### FIXED CODE ###

while True:
    (a, op, b) = input().split()
    a = int(a)
    b = int(b)

    if op == '?':
        break
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)
from math import floor

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

print(floor(A * B))

### FIXED CODE ###

from math import floor
from fractions import Fraction

A, B = input().split()

print(floor(int(A) * Fraction(B)))
x=list(input())
s=0
t=0
ans=0
for i in range(len(x)):
    if x[i]="S":
        s+=1

    else:
        if s==0:
            ans+=1
        else:
            s-=1

print(ans+s)

### FIXED CODE ###

x=list(input())
s=0
t=0
ans=0
for i in range(len(x)):
    if x[i]=="S":
        s+=1

    else:
        if s==0:
            ans+=1
        else:
            s-=1

print(ans+s)
a,b=map(int,input().split())
L=input()
for i in range(b):
  L.append(input())
  
  for j in range(b):
    print(L.count(L))

### FIXED CODE ###

a,b=map(int,input().split())
L=[]
for i in range(1,b+1):
    L +=[int(x) for x in input().split()]
for j in range(1,a+1):
      print(L.count(j))
from collections import defaultdict

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

odds_counter = defaultdict(int)
evens_counter = defaultdict(int)

for o in V[0::2]:
    odds_counter[o] += 1
for e in V[1::2]:
    evens_counter[e] += 1

odds = sorted(odds_counter.items(), key=lambda x: x[1], reverse=True)
evens = sorted(evens_counter.items(), key=lambda x: x[1], reverse=True)

if odds[0][0] != evens[0][0]:
    ans = n - odds[0][1] - evens[0][1]
else:
    if odds[0][1] >= evens[0][1]:
        if len(odds) == 1:
            ans = n//2 - evens[1][1]
        else:
            ans = n - evens[0][1] - odds[1][1]
    else:
        if len(evens) == 1:
            ans = n//2 - odds[1][1]
        else:
            ans = n - odds[0][1] - evens[1][1]
print(ans)


### FIXED CODE ###

from collections import defaultdict

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

odds_counter = defaultdict(int)
evens_counter = defaultdict(int)

for o in V[0::2]:
    odds_counter[o] += 1
for e in V[1::2]:
    evens_counter[e] += 1

odds = sorted(odds_counter.items(), key=lambda x: x[1], reverse=True)
evens = sorted(evens_counter.items(), key=lambda x: x[1], reverse=True)

if odds[0][0] != evens[0][0]:
    ans = n - odds[0][1] - evens[0][1]
else:
    if len(odds) == 1 and len(evens) == 1:
        ans = odds[0][1]
    elif len(odds) == 1 and len(evens) != 1:
        ans = n - odds[0][1] - evens[1][1]
    elif len(odds) != 1 and len(evens) == 1:
        ans = n - odds[1][1] - evens[0][1]
    else:
        ans = min(n - odds[0][1] - evens[1][1], n - odds[1][1] - evens[0][1])
print(ans)
import math

n = int(raw_input())

i = 1
# sqn = math.ceil(math.sqrt(n))

while math.sqrt(n) > i:
    if n % i == 0:
        ans = n / i
        #ans = int(math.log10(n / i)) + 1
    i += 1
print len(str(ans))#(ans)

### FIXED CODE ###

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

import math

n = int(raw_input())

i = 1
# sqn = math.ceil(math.sqrt(n))

while i * i <= n:
    if n % i == 0:
        ans = n / i
        #ans = int(math.log10(n / i)) + 1
    i += 1
print len(str(ans))#(ans)
r=int(input())
p=3.14159
print(f'{p*r*r} {2*p*r}')

### FIXED CODE ###

r=float(input())
p=3.141592653589
print(p*r*r,2*p*r)
n = int(input())
h = list(map(int,input().split()))
count = 0
lst = []
for i in range(n - 1):
    if (h[i] >= h[i + 1]):
        count = count + 1
    else:
        lst.append(count)
        count = 0
if (count != 0):
    lst.append(count)

lst.sort()
lst.reverse()

print(lst[0])


### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
count = 0
lst = []
if (n == 1):
    print(0)
else:
    for i in range(n - 1):
        if (h[i] >= h[i + 1]):
            count = count + 1
        else:
            lst.append(count)
            count = 0
    if (count != 0):
        lst.append(count)

    lst.sort()
    lst.reverse()

    print(lst[0])
n=int(input())
l=list(map(int,input().split()))
ans=0
for i in range(0,n-2):
  for j in range(i+1,n-1):
    x=l[i]+l[j]
    y=bisect.bisect_left(l,x)-1
    ans+=max((y-j),0)
    
print(ans)    
    

### FIXED CODE ###

import bisect
n=int(input())
l=list(map(int,input().split()))
l.sort()
ans=0
for i in range(0,n-1):
  for j in range(i+1,n):
    x=l[i]+l[j]
    y=bisect.bisect_left(l,x)-1
    ans+=max((y-j),0)
    
print(ans)
N, M = list(map(int, input().split()))
S = input()
T = input()

from fractions import gcd
L = (N * M) // gcd(N, M)

L1 = [1]
L2 = [1]
for i in range(1, N):
    t = i * (L // N) + 1
    L1.append(t)

for i in range(1, M):
    t = i * (L // M) + 1
    L2.append(t)

common = []

# print(L1)
# print(L2)

LS = [None] * L
for i, li in enumerate(L1):
    ind = li-1
    LS[ind] = S[i]

ans = True
for i, li in enumerate(L2):
    ind = li-1
    if LS[ind] is not None:
        if LS[ind] != T[i]:
            ans = False

if ans:
    print(L)
else:
    print(-1)

### FIXED CODE ###

from fractions import gcd

N, M = list(map(int, input().split()))
S = input()
T = input()

L = (N * M) // gcd(N, M)

L1 = [0]
L2 = [0]

from collections import Counter
c = Counter()

for i in range(1, N):
    t = i * (L // N) + 1
    L1.append(t-1)

for i in range(1, M):
    t = i * (L // M) + 1
    L2.append(t-1)


d = {}
for i, li in enumerate(L1):
    d[li] = S[i]

# print(d)

ans = True

for i, li in enumerate(L2):
    if not d.get(li):
        continue
    if d[li] != T[i]:
        ans = False

# print(L1)
# print(L2)
# print(common)
# print(dic)

if ans:
    print(L)
else:
    print(-1)
AB = input().split()
A = int(AB[0])
B = int(AB[1]*100)
print(A*B//100)

### FIXED CODE ###

AB = input().split()
A = int(AB[0])
B = AB[1].split('.')
B = int(B[0])*100 + int(B[1])
print(A*B//100)