Harryxun/stf_run huggingface dataset:
# 3
memo=dict()
def combi_memorized(n, k):
    if k * 2 > n:
        k = n - k
    if k == 0:
        return 1
    if k == 1:
        return n
    memo_key = (n, k)
    if (n, k) not in memo:
        memo[memo_key] = combi_memorized(n-1, k) + combi_memorized(n-1, k-1)
    return memo[memo_key]

import sys
sys.setrecursionlimit(10000)
N, M = (int(x) for x in sys.stdin.readline().split(' '))
a_list = [int(x) for x in sys.stdin.readlines()]

tmp_list = []
tmp_list.append(a_list[0]-1 - 0)
for i in range(1, M):
    tmp_list.append(a_list[i] - a_list[i-1]-1)
tmp_list.append(N - a_list[-1]-1)

if 0 in tmp_list[1:]:
    print(0)
    exit()
s = 0
for v in tmp_list:
    for i in range(v):
        s += combi_memorized(v-i, i)
        if s > 1000000007:
            s -= 1000000007
print(s)

### FIXED CODE ###

import sys
inputs = sys.stdin.readlines()

n, m = map(int, inputs[0].split())
B = set(map(int, inputs[1:]))
A = [0 if i in B else 1 for i in range(n+3)]
MOD = 10 ** 9 + 7

dp = [0]*(n+1)
dp[0], dp[1] = 1, A[1]
for i in range(1, n):
    dp[i+1] = (dp[i] + dp[i-1]) * A[i+1] % MOD
    if A[i] + A[i+1] == 0:
        break
print(dp[n])
s , w = int(input())

if s > w:
  print("safe")
else:
  print("unsafe")

### FIXED CODE ###

s , w = map(int, input().split())

if s > w:
  print("safe")
else:
  print("unsafe")
n=int(input())
a=list(map(int, input().split()))
b=sorted(a)
c=0
for i in range(n):
 x=a.index(b[i])
 j=0
 while x > i:
  j+=1
  y=a.index(b[x])
  c+=a[b]
  a[x],a[y]=a[y],a[x]
  x=y
 c+=min(b[i]*j,b[i]*2+b[0]*(j+2))
print(c)


### FIXED CODE ###

input()
a=list(map(int,input().split()))
b=sorted(a)
c=0
for i in range(len(a)):
 x=a.index(b[i])
 j=0
 while x>i:
  j+=1
  y=a.index(b[x])
  c+=a[y]
  a[x],a[y]=a[y],a[x]
  x=y
 c+=min(b[i]*j,b[i]*2+b[0]*(j+2))
print(c)
import sys
def input(): return sys.stdin.readline().strip()

def main():
    H, W = map(int, input().split())
    S = ['.' * W] + [input() for _ in range(H)] + ['.' * W]
    for i in range(1, H + 1):
        code = ""
        for j in range(W):
            if S[i][j] == '#':
                code += '#'
                continue
            if j == 0:
                string = S[i - 1][:2] + S[i][1] + S[i + 1][:2]
                cnt = string.count('#')
                code += str(cnt)
                continue
            if j == W - 1:
                string = S[i - 1][-2:] + S[i][-2] + S[i + 1][-2:]
                cnt = string.count('#')
                code += str(cnt)
                continue
            string = S[i - 1][j - 1:j + 2] + S[i][j - 1] + S[i][j + 1] + S[i + 1][j - 1:j + 2]
            cnt = string.count('#')
            code += str(cnt)
            continue
        print(code)


if __name__ == "__main__":
    main()


### FIXED CODE ###

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

def main():
    H, W = map(int, input().split())
    S = ['.' * W] + [input() for _ in range(H)] + ['.' * W]
    if W == 1:
        for i in range(1, H + 1):
            if S[i] == '#':
                print('#')
                continue
            string = S[i - 1] + S[i + 1]
            cnt = string.count('#')
            print(str(cnt))
        return
    for i in range(1, H + 1):
        code = ""
        for j in range(W):
            if S[i][j] == '#':
                code += '#'
                continue
            if j == 0:
                string = S[i - 1][:2] + S[i][1] + S[i + 1][:2]
                cnt = string.count('#')
                code += str(cnt)
                continue
            if j == W - 1:
                string = S[i - 1][-2:] + S[i][-2] + S[i + 1][-2:]
                cnt = string.count('#')
                code += str(cnt)
                continue
            string = S[i - 1][j - 1:j + 2] + S[i][j - 1] + S[i][j + 1] + S[i + 1][j - 1:j + 2]
            cnt = string.count('#')
            code += str(cnt)
            continue
        print(code)


if __name__ == "__main__":
    main()
import sys

input = sys.stdin.readline

R = int(input())

print(int(R ** 2))_


### FIXED CODE ###

import sys

input = sys.stdin.readline

R = int(input())

print(int(R ** 2))
s = input()
print("Yes" if 0 <= s.index("C") < s.rindex("F") else "No")


### FIXED CODE ###

s = input()
print("Yes" if 0 <= s.find("C") < s.rfind("F") else "No")
N=int(input())
a=list(map(int,input().split()))
dp=[0]*(10**5+1)
for i in range(N):
  for j in range(3):
    dp[a[i]+j]+=1
print(max(dp))

### FIXED CODE ###

N=int(input())
a=list(map(int,input().split()))
dp=[0]*(10**5+3)
for i in range(N):
  for j in range(3):
    dp[a[i]+j]+=1
print(max(dp))
def main114():
    import numpy as np

    S = input()
    answer = 0

    digit1 = []
    digit2 = []
    digit3 = []

    for i in range(len(S)):
        digit1.append(abs(7 - int(S[i])))
        digit2.append(abs(5 - int(S[i])))
        digit3.append(abs(3 - int(S[i])))

    first = [i for i, x in enumerate(digit1) if x == min(digit1) and i < len(digit1) - 2]

    if len(first) == 1:
        answer = int(S[first[0]]) * 100 + int(S[first[0] + 1]) * 10 + int(S[first[0] + 2])

    else:
        digit2_new = []
        for i in range(len(first)):
            digit2_new.append(digit2[first[i] + 1])

        second = [i for i, x in enumerate(digit2) if x == min(digit2_new) and i < len(digit2) - 1]
        if len(second) == 1:
            answer = int(S[first[0]]) * 100 + int(S[second[0]]) * 10 + int(S[second[0] + 1])
        else:
            digit3_new = []
            for i in range(len(second)):
                digit3_new.append(digit3[second[i] + 1])

            third = [i for i, x in enumerate(digit3) if x == min(digit3_new) and i < len(digit3)]
            answer = int(S[first[0]]) * 100 + int(S[second[0]]) * 10 + int(S[third[0]])

    answer = abs(753 - answer)
    print(answer)


main114()

### FIXED CODE ###

S=input()
print(min(abs(int(S[i:i+3])-753) for i in range(len(S)-2)))
n = []
i = 0

while True:
  n.append(input())
  if n[i] == 0:
    break
  i += 1

for j in range(i-1):
  print(???case ??? + str(i+1) + ??? : ??? + str(n[i]))

### FIXED CODE ###

n = []
i = 0

while True:
  n.append(int(input()))
  if n[i] == 0:
    break
  i += 1

for j in range(i):
  print("Case " + str(j+1) + ": " + str(n[j]))
# -*- coding: utf-8 -*-
N = int(input())
b = []
def f(n):
  for i in range[N+1]:
    a = [] #約数の個数を入れていくリスト
    while n>1:
      if n // i == 0:
      a.append(1) #リストに1を追加
      i = i+1
      else:
      i = i+1:continue
        
while N>1:
  f(N) #関数の実行
  if sum(a) == 8:
  b.append(1)#条件を満たす数をリストイン
  a.clear()
  N = N-1
  else:
  N = N-1

print(sum(b))
      

### FIXED CODE ###

N = int(input())
if N < 105:
  print(0)
elif 105 <= N < 135:
  print(1)
elif 135 <= N < 165:
  print(2)
elif 165 <= N < 189:
  print(3)
elif 189 <= N < 195:
  print(4)
else:
  print(5)
import numpy
n=int(input())
l=list(map(int, input().split()))
res=0
l.append(0)
l.reverse()
cum=numpy.cumsum(l)
for i in range(n+1):
    res+=l[n-i]*cum[n-i-1]
print(res%(10**9+7))

### FIXED CODE ###

d,t,s=map(int, input().split())
if d/s<=t:
  print("Yes")
else:
  print("No")
import math
n = int(input())
s = int(input())

def f(b, n):
    if n < b:
        return n
    else:
        return f(b, n//b) + (n%b)

if n == s:
    print(n+1)
elif n == 1:
    print(-1)
else:
    for b in range(2, int(math.sqrt(n)) + 1):
        if f(b, n) == s:
            print(b)
            break
    else:
        for p in range(1, int(math.sqrt(n)) + 1):
            b = int(((n-s)/p) + 1)
            if f(b, n) == s:
                print(b)
                break
        else:
            print(-1)

### FIXED CODE ###

import math
n = int(input())
s = int(input())

def f(b, n):
    ans = 0
    while b <= n:
        ans += n%b
        n //= b
    ans += n
    return ans

if n == s:
    print(n+1)
elif n < s:
    print(-1)
else:
    limit = math.ceil(math.sqrt(n))
    for b in range(2, limit + 1):
        if f(b, n) == s:
            print(b)
            break
    else:
        for p in range(limit, 0 ,-1):
            if s - p >= 0 and n-s+p > 0 and (n-s+p)//p > limit:
                b = (n-s+p)//p
                if f(b, n) == s:
                    print(b)
                    break
        else:
            print(-1)
n,m = (int(i) for i in input().split())
e = [[int(i) for i in input.split()] for i in range(n)]

s =[]
for cmd in e:
  if s==[]:
    s.append(cmd)
  else:
    found = False
    for tmp in s:
      if cmd[0]>=tmp[0] and cmd[0]<tmp[1]:
        tmp[0]=cmd[0]
        found = True
      if cmd[1]>tmp[0] and cmd[1]<=tmp[0]:
        tmp[1]=cmd[1]
        found = True
    if found == False:
      s.append(cmd)
      
print(len(size))

### FIXED CODE ###

n,m = [int(i) for i in input().split()]
e = [[int(j) for j in input().split()] for i in range(m)]
new_e =sorted(e,key= lambda x : x[1])
s=[]
for i in new_e:
  if s!= [] and i[0]<=s[-1]:
    pass
  else:
    s.append(i[1]-1)

print(len(s))
a,b = [int(i) for i in input().split()]

if a < b:
    print("{a}<{b}".format())

if a > b:
    print("{a}>{b}".format())


if a == b:
    print("{a}=={b}".format())

### FIXED CODE ###

a,b=map(int,input().split())
if a<b:
    print("a < b")
elif a>b:
    print("a > b")
else:
    print("a == b")
from collections import defaultdict

n = int(input())
xy = [list(map(int, input().split())) for _ in range(n)]

cnt = defaultdict(int)
for xi,yi in xy:
    for xj, yj in xy:
        cnt[(xi - xj, yi - yj)] += 1
cnt.pop((0, 0))
ans = n - max(cnt.values())
print(ans)


### FIXED CODE ###

from collections import defaultdict

n = int(input())
xy = [list(map(int, input().split())) for _ in range(n)]

cnt = defaultdict(int)
for xi, yi in xy:
    for xj, yj in xy:
        cnt[(xi - xj, yi - yj)] += 1
cnt[(0, 0)] = 0
ans = n - max(cnt.values())
print(ans)
H, W = map(int,input().split())
s = [list(input()) for _ in range(H)]
for i in range(H):
    s[i] = [0] + s[i] + [0]
s = [[0]*W] + s + [[0]*W]
for i in range(1,H+1):
    for j in range(1,W+1):
        if s[i][j] == '#':
            if s[i-1][j] == '#' or s[i][j-1] == '#' or s[i][j+1] == '#' or s[i+1][j] == '#':
                continue
            else:
                print('No')
                exit()
print('Yes')


### FIXED CODE ###

H, W = map(int,input().split())
s = [list(input()) for _ in range(H)]
for i in range(H):
    s[i] = [0] + s[i] + [0]
s = [[0]*(W+2)] + s + [[0]*(W+2)]
for i in range(1,H+1):
    for j in range(1,W+1):
        if s[i][j] == '#':
            if s[i-1][j] == '#' or s[i][j-1] == '#' or s[i][j+1] == '#' or s[i+1][j] == '#':
                continue
            else:
                print('No')
                exit()
print('Yes')
n = int(input())
a = list(map(int,input().split()))
for  i in range(1,n+1):
    v  = a[i]
    j = i-1
    while a[j]>v and j>0:
        a[j+1] = a[j]
        a[j] = v
        j -=1
    print(*a)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
for  i in range(n):
    v  = a[i]
    j = i-1
    while a[j]>v and j>=0:
        a[j+1] = a[j]
        j -=1

    a[j+1] = v
    print(*a)
n,m=map(int,input().split())
a=[0]+list(map(int,input().split()))
mods=[0]*m
mods[0]=1
for i in range(1,len(a)):
  a[i]=a[i-1]+a[i]
  mods[a[i]%m]+=1
ans=0
for i in range(len(mods)):
  p=mods[i]
  if p>1:
    ans+=p*(p-1)//2
print(ans)

### FIXED CODE ###

n,m=map(int,input().split())
a=[0]+list(map(int,input().split()))
from collections import defaultdict
mods=defaultdict(int)
mods[0]=1
for i in range(1,len(a)):
  a[i]=a[i-1]+a[i]%m
  mods[a[i]%m]+=1
ans=0
for v in mods.values():
  if v>1:
    ans+=v*(v-1)//2
print(ans)
N,A,B = map(int, input())

print(min(N*A, B))

### FIXED CODE ###

N,A,B = map(int, input().split())
 
print(min(N*A, B))
N, D = map(int, input().split())
 
result = -(-N // (2D+1))
 
print(result)

### FIXED CODE ###

N, D = map(int, input().split())
 
result = -(-N // (2*D+1))
 
print(result)
S=input().split(“ “)
A=int(S[0])
B=int(S[2])
C=S[1]
if S[1]=“+”
    print(A+B)
if S[1]=“-”
    print(A-B)

### FIXED CODE ###

S=input().split()
A=int(S[0])
B=int(S[2])
C=S[1]
if S[1]=="+":
    print(A+B)
if S[1]=="-":
    print(A-B)
n, a, b, c = list(map(int, input().split()))
ss = []
for i in range(n):
    ss.append(input())
ans = []
num_dic = {"A": a,"B": b, "C": c}

for i in range(n):
    s = ss[i]
    if num_dic[s[0]] == 0 and num_dic[s[1]] == 0:
        print("No")
        exit()
    elif num_dic[s[0]] > num_dic[s[1]]:
        num_dic[s[0]] -= 1
        num_dic[s[1]] += 1
        ans.append(s[1])
    elif num_dic[s[0]] < num_dic[s[1]]:
        num_dic[s[0]] += 1
        num_dic[s[1]] -= 1
        ans.append(s[0])
    elif i == n -1:
        ans.append(s[0])
    elif s[0] in s[i+1]:
        num_dic[s[0]] += 1
        num_dic[s[1]] -= 1
        ans.append(s[0])
    else:
        num_dic[s[0]] -= 1
        num_dic[s[1]] += 1
        ans.append(s[1])
print("Yes")
for a in ans:
    print(a)


### FIXED CODE ###

n, a, b, c = list(map(int, input().split()))
ss = []
for i in range(n):
    ss.append(input())
ans = []
num_dic = {"A": a,"B": b, "C": c}

for i in range(n):
    s = ss[i]
    if num_dic[s[0]] == 0 and num_dic[s[1]] == 0:
        print("No")
        exit()
    elif num_dic[s[0]] > num_dic[s[1]]:
        num_dic[s[0]] -= 1
        num_dic[s[1]] += 1
        ans.append(s[1])
    elif num_dic[s[0]] < num_dic[s[1]]:
        num_dic[s[0]] += 1
        num_dic[s[1]] -= 1
        ans.append(s[0])
    elif i == n -1:
        ans.append(s[0])
        num_dic[s[0]] -= 1
        num_dic[s[1]] += 1
    elif s[0] in ss[i+1]:
        num_dic[s[0]] += 1
        num_dic[s[1]] -= 1
        ans.append(s[0])
    else:
        num_dic[s[0]] -= 1
        num_dic[s[1]] += 1
        ans.append(s[1])
print("Yes")
for a in ans:
    print(a)
N,K,Q=map(int,input().split())

list=[(K-Q) for i in range(N)]

for i in range(Q):
	A=int(input())-1
  	list[A]+=1

for score in list:
  	if score>0:
      	print("Yes")
	else:
      	print("No")

### FIXED CODE ###

N,K,Q=map(int, input().split())

list=[(K-Q) for j in range(N)]

for i in range(Q):
    a=int(input())-1
    list[a]+=1

for score in list:
    if 0<score:
        print("Yes")
    else:
        print("No")
N = int(input())

if N == 1:
  print('Hello World')

else:
  A = int(imput())
  B = int(imput())
  
  print(A + B)

### FIXED CODE ###

N = int(input())

if N == 1:
    print("Hello World")
else:
    A = int(input())
    B = int(input())
    print(A + B)
import math

N = int(input())

total = 0
   
for i in range(1,int(math.sqrt(N)+1)):
    amari = i
    if N % amari == 0:
        k = N // amari - 1
        if amari == N % k:
            total += N//amari - 1
        #print(amari)

print(total)

### FIXED CODE ###

import math

N = int(input())

total = 0
   
if N != 1:        
    for i in range(1,int(math.sqrt(N)+1)):
        amari = i
        if N % amari == 0:
            k = N // amari - 1
            if amari == N % k:
                total += N//amari - 1
        #print(amari)

print(total)
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
cnt = 26 * [0]
Input = ""
loop = True

while loop:
    I = input()
    if not I:
        loop = False
    Input += I

for i1 in range(len(alphabet)):
    for i2 in range(len(Input)):
        if 'A' <= Input[i2] <= 'Z':
            w = Input[i2].lower()
        else:
            w = Input[i2]
        if alphabet[i1] == w:
            cnt[i1] += 1
    print(alphabet[i1] + " : " + str(cnt[i1]))

### FIXED CODE ###

import sys

alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
cnt = 26 * [0]
Input = ""
loop = True

for I in sys.stdin:
    Input += I

for i1 in range(len(alphabet)):
    for i2 in range(len(Input)):
        if 'A' <= Input[i2] <= 'Z':
            w = Input[i2].lower()
        else:
            w = Input[i2]
        if alphabet[i1] == w:
            cnt[i1] += 1
    print(alphabet[i1] + " : " + str(cnt[i1]))
a = input()
b = "keyence"
j = 0
for i in a:
  if i==b[j]:
    j+=1
print("YES" if j == 7 else "NO")

### FIXED CODE ###

s = input()
k = "keyence"
for i in range(8):
    if s.startswith(k[:i]) and s.endswith(k[i:]):
        print("YES")
        break
else:
    print("NO")
N = int(input())
L = [0]*100
L[0] = 2
L[1] = 1
for i in range(2,N+1):
    L[i] = L[i-1] + L[i-2]
print(L[i])

### FIXED CODE ###

N = int(input())
L = [0]*100
L[0] = 2
L[1] = 1
if N == 0 or N == 1:
    print(L[N])
    exit()
for i in range(2,N+1):
    L[i] = L[i-1] + L[i-2]
print(L[i])
n, m, x = map(int, input().split())
books = [0]*n
for i in range(n):
  books[i] = [int(x) for x in input().split()]

ans = 10**9
for i in range(2**n):
  cost = 0
  point = [0]*m
  for j in range(n):
    if (i>>j)&1:
      for k in range(1, m+1):
        point[k-1] += books[j][k]
  flag = True
  for j in range(m):n, m, x = map(int, input().split())
books = [0]*n
for i in range(n):
  books[i] = [int(x) for x in input().split()]

ans = 10**9
for i in range(2**n):
  cost = 0
  point = [0]*m
  for j in range(n):
    if (i>>j)&1:
      cost += books[j][0]
      for k in range(1, m+1):
        point[k-1] += books[j][k]
  flag = True
  for j in range(m):
    if point[j] < x:
      flag = False
  if flag and ans > cost:
    ans = cost

print(ans if ans != 10**9 else -1)
    if point[j] < x:
      flag = False
  if flag and ans > cost:
    ans = cost

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

### FIXED CODE ###

n, m, x = map(int, input().split())
books = [0]*n
for i in range(n):
  books[i] = [int(x) for x in input().split()]

ans = 10**9
for i in range(2**n):
  cost = 0
  point = [0]*m
  for j in range(n):
    if (i>>j)&1:
      cost += books[j][0]
      for k in range(1, m+1):
        point[k-1] += books[j][k]
  flag = True
  for j in range(m):
    if point[j] < x:
      flag = False
  if flag and ans > cost:
    ans = cost

print(ans if ans != 10**9 else -1)
from collections import *
from heapq import*
import sys
input=lambda:sys.stdin.readline()


def BFS(point,d):
    cost=[1e7]*(n+1)
    cost[point]=0
    Q=[]
    Q.appendleft((0,point))
    
    while Q:
        c,p=Q.pop()
        for np in d[p]:
            if cost[np]==1e7:
                cost[np]=c+1
                heappush(Q,(c+1,np))
    return cost

n=int(input())
d=[deque()for i in range(n+1)]
for i in range(n-1):
    a,b=map(int,input().split())
    d[a].append(b)
    d[b].append(a)
        
x=BFS(1,d)[1:]
y=BFS(n,d)[1:]

#print(x,y)

F=0
S=0

for s,t in zip(x,y):
    if s<=t:
        F+=1
    else:
        S+=1

if F<=S:
    print("Snuke")
else:
    print("Fennec")


### FIXED CODE ###

#高速化heapqダイクストラ
from collections import *
from heapq import*
import sys
input=lambda:sys.stdin.readline()


def DIJKSTRA(point,d):
    cost      = [float("inf")]*(n+1)
    Q         = []
    cost[point]=0
    heappush(Q,(point,cost[point]))
    while Q:
        prefnd,tmpC=heappop(Q)
        if cost[prefnd]<tmpC:
            continue
        for node,c in d[prefnd]:
            altC=c+tmpC
            if cost[node]>altC:
                cost[node]=altC
                heappush(Q,(node,altC))
    return cost

n=int(input())
d={}
for i in range(n-1):
    a,b=map(int,input().split())
    if a in d.keys():
        d[a].append([b,1])
    else:
        d[a]=[[b,1]]
    if b in d.keys():
        d[b].append([a,1])
    else:
        d[b]=[[a,1]]
        
x=DIJKSTRA(1,d)[1:]
y=DIJKSTRA(n,d)[1:]
#print(x)
#print(y)
F=0
S=0
for s,t in zip(x,y):
    if s<=t:
        F+=1
    else:
        S+=1
if F<=S:
    print("Snuke")
else:
    print("Fennec")
n, m = map(int, input().rstrip().split())
h = map(int, input().rstrip().split())
l = []
high = [0] * n
count = 0

for i in range(m):
    a, b = map(int, input().rstrip().split())
    l.append([a, b])

for i in l:
    if h[i[0]-1] < h[i[1]-1]:
        high[i[0]-1] += 1
    elif h[i[0]-1] == h[i[1]-1]:
        high[i[0]-1] += 1
        high[i[1]-1] += 1
    else:
        high[i[1]-1] += 1

for hi in high:
    if hi == 0:
        count += 1
print(count)

### FIXED CODE ###

n, m = map(int, input().rstrip().split())
h = list(map(int, input().rstrip().split()))
l = []
high = [0] * n
count = 0

for i in range(m):
    a, b = map(int, input().rstrip().split())
    l.append([a, b])

for i in l:
    if h[i[0]-1] < h[i[1]-1]:
        high[i[0]-1] += 1
    elif h[i[0]-1] == h[i[1]-1]:
        high[i[0]-1] += 1
        high[i[1]-1] += 1
    else:
        high[i[1]-1] += 1

for hi in high:
    if hi == 0:
        count += 1
print(count)
import math
N = int(input())
m = int(math.sqrt(N))
a = 0
ans = 0
count = 1

for i in range(m, 1, -1):
    if N % i == 0:
        a = i
        break

a = max(a, (N//a))

while True:
    if a >= 10:
        count += 1
        a = a// 10
    else:
        break
    
print(count)


### FIXED CODE ###

import math
N = int(input())
m = int(math.sqrt(N))
a = 0
ans = 0
count = 1

for i in range(1, m+1):
    if N % i == 0:
        a = i

a = max(a, (N//a))

while True:
    if a >= 10:
        count += 1
        a = a// 10
    else:
        break
    
print(count)
a,b,t=map(int,input().split())
print((t+0.5)＊b/a)

### FIXED CODE ###

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

ans = int(((t+0.5)//a)*b)
print(ans)
import sys
def number():
    while True:
        a,b = map(int(input().split()))
        if a == 0 and b == 0 :
	        break
        if a < b:
    	    print (a, b)
        else:
    	    print (b,a)

if __name__ == "__main__":
	number()

### FIXED CODE ###

import sys
def number():
    a = []
    b = []
    i = 0
    while True:
        x,y = map(int,input().split())
        if x == 0 and y == 0:
            break
        a.append(x)
        b.append(y)
        i += 1
    for j in range(len(a)):
        if a[j] < b[j]:
            print (a[j],b[j])
        else:
            print (b[j],a[j])

if __name__ == "__main__":
    number()
a = input()
if a='Sunny':
  print('Cloudy')
elif a='Cloudy':
  print('Rainy')
elif a='Rainy':
  print('Sunny')
  

### FIXED CODE ###

a = input()
if a=='Sunny':
  print('Cloudy')
elif a=='Cloudy':
  print('Rainy')
elif a=='Rainy':
  print('Sunny')
n,k,c = map(int,input().split())
s = [i == "o" for i in list(input())]
i = 0
cnt = 0
l = [0]*n
r = [0]*n
while i < n:
    if s[i]:
        cnt += 1
        for j in range(i,c+i+1):
            if j < n:
                l[j] = cnt
        i += c+1
    else:
        l[i] = cnt
        i += 1
i = n-1
cnt = 0
while i >= 0:
    if s[i]:
        cnt += 1
        for j in range(i,i-1-c,-1):
            if j >= 0:
                r[j] = cnt
        i -= c+1
    else:
        r[i] = cnt
        i -= 1
#print(l,r)
if r[1] < k:
    print(1)
for i in range(1,n-1):
    if not s[i]:
        continue
    if l[i-1] + r[i+1] < k:
        print(i+1)
if l[n-2] < k:
    print(n)

### FIXED CODE ###

n,k,c = map(int,input().split())
s = [i == "o" for i in list(input())]
i = 0
cnt = 0
l = [0]*n
r = [0]*n
while i < n:
    if s[i]:
        cnt += 1
        for j in range(i,c+i+1):
            if j < n:
                l[j] = cnt
        i += c+1
    else:
        l[i] = cnt
        i += 1
i = n-1
cnt = 0
while i >= 0:
    if s[i]:
        cnt += 1
        for j in range(i,i-1-c,-1):
            if j >= 0:
                r[j] = cnt
        i -= c+1
    else:
        r[i] = cnt
        i -= 1
#print(l,r)
r.append(0)
if r[1] < k:
    print(1)
for i in range(1,n-1):
    if not s[i]:
        continue
    if l[i-1] + r[i+1] < k:
        print(i+1)
if l[n-2] < k:
    print(n)
x = list(map(int, input().split())
x.sort()
print("{0} {1} {2}".format(x[0],x[1],x[2])

### FIXED CODE ###

x = list(map(int, input().split()))
x.sort()
print("{0} {1} {2}".format(x[0],x[1],x[2]))
X = int(input())

sumval = 0
for i in range(1,X):
	sumval += i
	if sumval >= X:
		ans = i
		break

print(ans)


### FIXED CODE ###

X = int(input())

sumval = 0
for i in range(1,X+1):
	sumval += i
	if sumval >= X:
		ans = i
		break

print(ans)