Harryxun/stf_run huggingface dataset:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
cnt = 0

# 偶数
if a != 0:
    if a % 2 != 0:
        a = a - 1

# 奇数


# 組み合わせ
nCr = {}

# https://qiita.com/derodero24/items/91b6468e66923a87f39f
def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n, r) in nCr: return nCr[(n, r)]
    nCr[(n, r)] = cmb(n - 1, r) + cmb(n - 1, r - 1)
    return nCr[(n, r)]


#
if a != 0:
    cnt = cnt + cmb(a, 2)
cnt = cnt + cmb(b, 2)
print(cnt)


### FIXED CODE ###

# -*- coding: utf-8 -*-
a, b = map(int, input().split())
cnt = 0

# 偶数
#if a != 0:
#    if a % 2 != 0:
#        a = a - 1

# 奇数


# 組み合わせ
nCr = {}

# https://qiita.com/derodero24/items/91b6468e66923a87f39f
def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n, r) in nCr: return nCr[(n, r)]
    nCr[(n, r)] = cmb(n - 1, r) + cmb(n - 1, r - 1)
    return nCr[(n, r)]


#
if a > 1:
    cnt = cnt + cmb(a, 2)

if b > 1:
    cnt = cnt + cmb(b, 2)
print(cnt)
N, M = map(int, input().split())
list = list(map(int, input().split()))
m=0
for i in range (0, len(list)):
	m=m+list[i]
if N-m>=0:
print(N-m)
else:
print(0)

### FIXED CODE ###

N, M = map(int, input().split())
list = list(map(int, input().split()))
 
m=0
for i in range (0, len(list)):
	m=m+list[i]
if N-m>=0:
	print(N-m)
elif N-m<0:
	print(-1)
import numpy as np
def main():
    x = np.array([1,100])
print(np.cube(x))


### FIXED CODE ###

x = input()
print x*x*x
s = input()
k = int(input())

index = []

for i in range(len(s)):
    for j in range(i+1,i+k):
        jyuhuku = 0
        for a in index:
            if(a == s[i:j]):
                jyuhuku = 1
                break
            
        if(jyuhuku == 0):
            index.append(s[i:j])
    
print(sorted(index)[k-1])


### FIXED CODE ###

s = input()
k = int(input())

index = []

for i in range(len(s)):
    for j in range(i+1,i+k+1):
        index.append(s[i:j])
    
print(sorted(list(set(index)))[k-1])
a,b = int(input())
print(a+b,(a+b)*2)

### FIXED CODE ###

a,b=[int(i) for i in input().split()]
print(a*b,(a+b)*2)
n, y = map(int, input().split())
ans = 0
for i in range(n+1):
    for j in range(n+1-i):
        for k in range(n+1-i-j):
            if y == 10000*i + 5000*j + 1000*k:
                print(i j k)
                ans += 1
if ans == 0:
    print("-1 -1 -1")

### FIXED CODE ###

n, y = map(int, input().split())
ans = 0
for i in range(n+1):
    for j in range(n+1-i):
        if y == 10000*i + 5000*j + 1000*(n-i-j):
            print(i, j, n-i-j)
            ans += 1
            exit()
if ans == 0:
    print("-1 -1 -1")
import math

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

# A *= 100
B = math.floor(B * 100)

AB = A * B / 100
floored = int(math.floor(AB))
print(floored)

# AB = A * B
# AB = str(AB)
# AB = AB[0:-2]
# AB = 0 if AB == '' else AB
# print(AB)


### FIXED CODE ###

import math

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

# A *= 100
# B = float(B)
# B = math.floor(B * 100)
B = B.replace('.', '').ljust(3, '0')
B = int(B)

# AB = A * B / 100
# floored = int(math.floor(AB))
# print(floored)

AB = A * B
AB = str(AB)
AB = AB[0:-2]
AB = 0 if AB == '' else AB
print(AB)
def lun(s):
    ch = 1
    temp = int(s[0])
    for i in s[1: ]:
        i = int(i)
        if abs(i - temp) > 1:
            ch = 0
            break
        temp = i
    return ch
k = int(input())
d = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
l = ['1', '2', '3', '4', '5', '6', '7', '8', '9']
while 1:
    for i in l:
        for j in d:
            # print(i, j)
            s = i + str(j)
            if lun(s): l.append(s)
        if len(l) >= 10000: break
    if len(l) >= 10000: break
k = input()
print(l[k])

### FIXED CODE ###

def lun(s):
    ch = 1
    temp = int(s[0])
    for i in s[1: ]:
        i = int(i)
        if abs(i - temp) > 1:
            ch = 0
            break
        temp = i
    return ch
k = int(input())
d = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
l = ['1', '2', '3', '4', '5', '6', '7', '8', '9']
while 1:
    for i in l:
        for j in d:
            # print(i, j)
            s = i + str(j)
            if lun(s): l.append(s)
        if len(l) >= 100002: break
    if len(l) >= 100002: break
print(l[k - 1])
N,K = list(map(int, input().split()))
A = list(map(int, input().split()))
r = 0
if K <= N:
    current = 0
    for i in K:
        current = A[current-1]
    print(current)
else:
    isReturn = [0]*(N)
    step = 1
    current = 1
    isReturn[current-1] = step
    for i in range(K):
        current = A[current-1]
        step += 1
        if isReturn[current-1] == 0:
            isReturn[current-1] = step
        else:
            r = step - isReturn[current-1]
            break
    
    t = (K-step) % r
    for i in range(t+1):
        current = A[current-1]
        
    print(current)
    
    
                
            
    
    
                
            


### FIXED CODE ###

N,K = list(map(int, input().split()))
A = list(map(int, input().split()))
r = 0
if K <= N:
    current = 1
    for i in range(K):
        current = A[current-1]
    print(current)
else:
    isReturn = [0 for i in range(N)]
    step = 1
    current = 1
    isReturn[current-1] = step
    for i in range(N):
        current = A[current-1]
        step += 1
        if isReturn[current-1] == 0:
            isReturn[current-1] = step
        else:
            r = step - isReturn[current-1]
            break
    
    t = ((K-step) % r) + 1
    for i in range(t):
        current = A[current-1]
        
    print(current)
a = int(raw_input())
b = int(raw_input())
h = int(raw_input())
return ((a + b) / 2) * h

### FIXED CODE ###

a = int(raw_input())
b = int(raw_input())
h = int(raw_input())
print (((a + b) * h) / 2)
n, k = map(int, input().split())
a = [int(i)-1 for i in input().split()]

p = 0

if n>=k:
    for i in range(k):
        p = a[p]
    print(p+1)

else:
    lst = [-1]*n
    lst[0] = 0
    
    for i in range(1,n+1):
        p = a[p]
        if lst[p] == -1:
            lst[p] = i
        else:
            loop = i - lst[p]
            k -= lst[p]
            extra = k % loop
            break

for i in range(extra):
    p = a[p]
print(p+1)

### FIXED CODE ###

n, k = map(int, input().split())
a = [int(i)-1 for i in input().split()]

p = 0

if n>=k:
    for i in range(k):
        p = a[p]
    print(p+1)

else:
    lst = [-1]*n
    lst[0] = 0
    
    for i in range(1,n+1):
        p = a[p]
        if lst[p] == -1:
            lst[p] = i
        else:
            loop = i - lst[p]
            k -= lst[p]
            extra = k % loop
            break

    for i in range(extra):
        p = a[p]
    print(p+1)
import itertools

n, m, q = map(int, input().split())
abcd = [tuple(map(int, input().split())) for _ in range(Q)]
ans = 0
for com in itertools.combinations_with_replacement(range(1, M + 1), N):
    score = sum([d for a, b, c, d in abcd if com[b-1] - com[a-1] == c])
    if ans < score:
        ans = score
print(ans)


### FIXED CODE ###

import itertools

n, m, q = map(int, input().split())
abcd = [tuple(map(int, input().split())) for _ in range(q)]
ans = 0
for com in itertools.combinations_with_replacement(range(1, m + 1), n):
    score = sum([d for a, b, c, d in abcd if com[b-1] - com[a-1] == c])
    if ans < score:
        ans = score
print(ans)
N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = list(input())
ro, si, pa = 0,0,0
rp, sp, pp = 0,0,0
for t in range(len(T)):
	if T[t] == 'r':
		pa += 1
		if (t - K >= 0 and T[t-K] == 'r') and (t+K>N or(t+K<=N and T[t+K] != 'r')):
			pp += 1
	if T[t] == 's':
		ro += 1
		if (t - K >= 0 and T[t-K] == 's') and (t+K>N or(t+K<=N and T[t+K] != 's')):
			rp += 1
	if T[t] == 'p':
		si += 1
		if (t - K >= 0 and T[t-K] == 'p') and (t+K>N or(t+K<=N and T[t+K] != 'p')):
			sp += 1
s_r = (ro-rp)*R
s_s = (si-sp)*S
s_p = (pa-pp)*P
print(s_r+s_s+s_p)

### FIXED CODE ###

N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = list(input())
r, s, p = 0,0,0
for i in range(N):
	if i-K >= 0 and T[i-K] == T[i]:
		T[i] = None
	elif T[i] == 'r':
		p += 1
	elif T[i] == 's':
		r += 1
	elif T[i] == 'p':
		s += 1
print(r*R+s*S+p*P)
import math
n = int(input())

def yakusu(n):
    l = []
    for i in range(1,int(math.sqrt(n))+1):
 #       print(i)
        if n%i == 0:
            l.append(i)
            l.append(n//i)
    return(l)

l = yakusu(n)

ans = 0
for m in l[1:]:
    if n == int(n/(m-1))*m:
        ans += m-1
    
#print(l)
print(ans)

### FIXED CODE ###

import math
n = int(input())

def yakusu(n):
    l = []
    for i in range(1,int(math.sqrt(n))+1):
 #       print(i)
        if n%i == 0:
            l.append(i)
            l.append(n//i)
    return(l)

l = yakusu(n)

ans = 0
for m in l:
    if m-1 > 0 and n == int(n/(m-1))*m:
        ans += m-1
    
#print(l)
print(ans)
import sys, math, collections, heapq, itertools
from bisect import bisect_left
  
def solve():
    file = sys.stdin.readline #single: int(file()), line: map(int, file().split())
    INF = 10 ** 25
    mod = 7 + 10 ** 9
    N = int(file())
    A = [int(a) for a in file().split()]
    A.sort()
    ans = 0
    out = []
    if N == 2:
        ans = A[1] - A[0]
        out = [A[1], A[0]]
    else:
        plus = bisect_left(A, 0)
        if plus == 0: plus = 1
        if plus < N:
            ans = A[0]
            for i in range(plus, N - 1):
                out.append([ans, A[i]])
                ans -= A[i]
            out.append([A[N-1], ans])
            ans = A[N-1] - ans
            for i in range(1, plus):
                out.append([ans, A[i]])
                ans -= A[i]
        else:
            ans = A[N-1]
            for i in range(N-1):
                out.append([ans, A[i]])
                ans -= A[i]

    print(ans)
    for k in out:
        print(" ".join(map(str, k)))


    return 0
  
if __name__ == "__main__":
    solve()

### FIXED CODE ###

import sys, math, collections, heapq, itertools
from bisect import bisect_left
  
def solve():
    file = sys.stdin.readline #single: int(file()), line: map(int, file().split())
    INF = 10 ** 25
    mod = 7 + 10 ** 9
    N = int(file())
    A = [int(a) for a in file().split()]
    A.sort()
    ans = 0
    out = []
    if N == 2:
        ans = A[1] - A[0]
        out = [[A[1], A[0]]]
    else:
        plus = bisect_left(A, 0)
        if plus == 0:
            ans = A[0]
            for i in range(1, N-1):
                out.append([ans, A[i]])
                ans -= A[i]
            out.append([A[N-1], ans])
            ans = A[N-1] - ans
        elif plus < N:
            ans = A[0]
            for i in range(plus, N - 1):
                out.append([ans, A[i]])
                ans -= A[i]
            out.append([A[N-1], ans])
            ans = A[N-1] - ans
            for i in range(1, plus):
                out.append([ans, A[i]])
                ans -= A[i]
        else:
            ans = A[N-1]
            for i in range(N-1):
                out.append([ans, A[i]])
                ans -= A[i]

    print(ans)
    for k in out:
        print(" ".join(map(str, k)))


    return 0
  
if __name__ == "__main__":
    solve()
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

a = [0]
b = [0]
for i in range(N):
  a.appned(a[i]+A[i])
for i in range(M):
  b.append(b[i]+B[i])

ans, j = 0, M
for i in range(len(A)):
  if a[i] > K:
    break
  while B[j] > K - a[i]:
    j -= 1
  ans = max(ans, i+j)
print(ans)

### FIXED CODE ###

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
 
a = [0]
b = [0]
for i in range(N):
  a.append(a[i]+A[i])
for i in range(M):
  b.append(b[i]+B[i])

ans, j = 0, M
for i in range(N+1):
  if a[i] > K:
    break
  while b[j] > K - a[i]:
    j -= 1
  ans = max(ans, i+j)
print(ans)
if a[0] == a[1] == a[2]: print("No")
elif a[0] == a[1] or a[1] == a[2]: print("Yes")
else: print("No")

### FIXED CODE ###

a = [int(x) for x in input().split()]
a.sort()
if a[0] == a[1] == a[2]: print("No")
elif a[0] == a[1] or a[1] == a[2]: print("Yes")
else: print("No")
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque, Counter

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()

fac = [-1] * (10**2+1)

fac[0] = fac[1] = 1

def initNCM(limit):
    for i in range(2, limit):
        fac[i] = fac[i-1] * i

def NCM(n, r):
    return fac[n] / (fac[r] * fac[n-r])

initNCM(51)

def main():
    N, A, B = LI()
    v = sorted(LI())[::-1]
    cnt = Counter(v)
    selected = v[:A]
    print(sum(selected)/A)
    ans = 1
    used = 0
    for x in selected:
        used += cnt[x]
    used -= cnt[selected[-1]]
    ans = 0
    if len(selected) > 1:
        use_last = A - used
        ans += NCM(cnt[selected[-1]], use_last)
    else:
        for use_last in range(1, N+1):
            if not A <= used + use_last <= B:
                continue
            if use_last > cnt[selected[-1]]:
                continue
            ans += NCM(cnt[selected[-1]], use_last)
    print(int(ans))

main()



### FIXED CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque, Counter

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()

fac = [-1] * (10**2+1)

fac[0] = fac[1] = 1

def initNCM(limit):
    for i in range(2, limit):
        fac[i] = fac[i-1] * i

def NCM(n, r):
    return fac[n] / (fac[r] * fac[n-r])

initNCM(100)

def main():
    N, A, B = LI()
    v = sorted(LI())[::-1]
    cnt = Counter(v)
    selected = v[:A]
    print(sum(selected)/A)
    ans = 1
    used = 0
    for x in list(set(selected)):
        used += cnt[x]
    used -= cnt[selected[-1]]
    ans = 0
    if len(list(set(selected))) > 1:
        use_last = A - used
        ans += NCM(cnt[selected[-1]], use_last)
    else:
        for use_last in range(1, N+1):
            if not A <= used + use_last <= B:
                continue
            if use_last > cnt[selected[-1]]:
                continue
            ans += NCM(cnt[selected[-1]], use_last)
    print(int(ans))

main()
a = input()
print(!a)

### FIXED CODE ###

a = int(input())
if a == 0:
    print(1)

if a == 1:
    print(0)
import numpy as np


N,A,B = map(int,raw_input().split())

city = raw_input()

ci = city.split(" ")

path = []

for i in range(len(ci)-1):
    z = int(ci[i+1])-int(ci[i])
    path.append(z)

costa = []

def binary_encode(i, num_digits):
    return np.array([i >> d & 1 for d in range(num_digits)])

for i in range(2**len(path)):
    pc = binary_encode(i,len(path))
    cost =0
    for z in range(len(pc)):
        if pc[z] == 0:
            cost = cost + A *path[z]
        else:
            cost = cost + B

    costa.append(cost)

print min(costa)
~                              

### FIXED CODE ###

import numpy as np

A ,B ,C, D = map(int,raw_input().split())


a=A*B
c=C*D


if a<c:
    print c
else:
    print a
a, b, c, d = map(int, input().split())
row = [i for i in range(101)]
row[a-1:b] += 1
row[c-1:d] += 1
print(row.count(0))


### FIXED CODE ###

a, b, c, d = map(int, input().split())
row = [0 for i in range(101)]
for i in range(a, b+1) : row[i] += 1
for i in range(c, d+1) : row[i] += 1
if row.count(2) == 0 : print(0)
else : print(row.count(2)-1)
b,c=map(input().split())
  
if (b//2+b%2)>=c:
    print("YES")
else : print("NO")

### FIXED CODE ###

b,c=map(int,input().split())
  
if (b//2+b%2)>=c:
    print("YES")
else : print("NO")
N = int(input().rstrip())
numbers =[ int(i) for i in input().rstrip().split()]
  

n_dic = {str(i):0 for i in set(numbers)}


for i in numbers:
    n_dic[str(i)] += 1
   
count = 0

for i,j in n_dic.items():
    if int(i) < j:
        count += j - int(i)
    
    elif int(i) > j:
        count += j
        
print(count)

### FIXED CODE ###

import math
numbers = input().rstrip().split()
number1 = int(numbers[0])
number2 = int(numbers[1])
 
mean = (number1+number2) / 2
 
print(math.ceil(mean))
a = int(input())
b = int(input())

if (a*b)%2 == 0:
    print('No')
else:
    print('Yes')

### FIXED CODE ###

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

if (a*b)%2 == 0:
    print('No')
else:
    print('Yes')
a, b = map(int, input().split())
tower = [n*(2+(i-1))/2 for i in range(1, 1000)]

for i in range(999):
  if b - a == tower[i+1] - tower[i]:
    print(a-tower[i])
    break


### FIXED CODE ###

a, b = map(int, input().split())
tower = [i*(2+(i-1))/2 for i in range(1, 1000)]

for i in range(999):
    if a - tower[i] == b - tower[i+1]:
        print(int(abs(tower[i]-a)))
        break
n, k = map(int, input().split())
a = list(map(int, input().split()))
bitcount = []
k += 1
f = [sum(a)]
while(m > 0 or max(a) > 0):
    odd = sum(list(map(lambda x: x%2, a)))
    bitcount.append(odd)
    a = list(map(lambda x: x//2, a))
    m = m//2
for keta in range(len(bitcount)):
    if k & (2 ** keta) != 0:
        ans = 0
        for i in range(keta):
            ans += max(bitcount[i], n - bitcount[i]) * 2 ** i
        for i in range(keta + 1, len(bitcount)):
            if k & (2 ** i) == 0:
                ans += bitcount[i] * 2 ** i
            else:
                ans += (n - bitcount[i]) * 2 ** i
        ans += bitcount[keta] * 2 ** keta
        f.append(ans)
print(max(f))


### FIXED CODE ###

n, k = map(int, input().split())
a = list(map(int, input().split()))
bitcount = []
k += 1
m = k
f = [sum(a)]
while(m > 0 or max(a) > 0):
    odd = sum(list(map(lambda x: x%2, a)))
    bitcount.append(odd)
    a = list(map(lambda x: x//2, a))
    m = m//2
for keta in range(len(bitcount)):
    if k & (2 ** keta) != 0:
        ans = 0
        for i in range(keta):
            ans += max(bitcount[i], n - bitcount[i]) * 2 ** i
        for i in range(keta + 1, len(bitcount)):
            if k & (2 ** i) == 0:
                ans += bitcount[i] * 2 ** i
            else:
                ans += (n - bitcount[i]) * 2 ** i
        ans += bitcount[keta] * 2 ** keta
        f.append(ans)
print(max(f))
list=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K=int(input())
print(list[K])


### FIXED CODE ###

list=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K=int(input())
print(list[K-1])
a,b,c=map(int,input().split())
x = a%b
print("Yes" if c%x==0 else "No")

### FIXED CODE ###

a,b,c=map(int,input().split())
x = any((a*i)%b==c for i in range(1,b+1))
print("YES" if x else "NO")
N = int(input())

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


tmp = factorization(N)
if tmp == [[1, 1]]:
    print(0)
    exit()
res = 0
A = [0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5]
for _, a in tmp:
    res += A[a]

print(res)


### FIXED CODE ###

import math

def f(n):
    arr = list()
    temp = n
    for i in range(2, int(math.sqrt(n)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append(tuple([i, cnt]))

    if temp != 1:
        tup = tuple([temp, 1])
        arr.append(tup)

    if len(arr) == 0:
        tup = tuple([n, 1])
        arr.append(tup)

    return arr

N = int(input())
if N == 1:
    print(0)
    exit()

t = f(N)
res = 0

for a in t:
    cnt = 0
    c = 0
    while cnt <= a[1]:
        c += 1
        cnt += c
    res += c - 1
    
print(res)
def main():
    [n,a,b] = list(map(int,input().split()))
    m = list(map(int,input().split()))
    cost = 0
    for i in range(1,n+1):
        cost += min(a*(m[i]-m[i-1]), b)
    print(cost)


if __name__ == "__main__":
    main()

### FIXED CODE ###


def main():
    [n, a, b] = list(map(int,input().split()))
    m = list(map(int,input().split()))
    cost = 0
    for i in range(1, n):
        cost += min([a*(m[i]-m[i-1]), b])
    print(cost)


if __name__ == "__main__":
    import sys
    import os
    if len(sys.argv) > 1:
        if sys.argv[1] == "-d":
            filename = "input1.txt"
            fd = os.open(filename, os.O_RDONLY)
            os.dup2(fd, sys.stdin.fileno())
            main()
    else:
        main()
s = int(input())
sl = list(str(s))
prev = a
for si in sl:
    if prev == si:
        print('Bad')
        exit()
print('Good')

### FIXED CODE ###

sl = list(input())
prev = 'a'
for si in sl:
    if prev == si:
        print('Bad')
        exit()
    prev = si
print('Good')
A,B,K = map(int, raw_input().split())
  
for i in range(A,B+1):
    if (i >= A and i <= A + K - 1) or (i >= B - K + 1 and i <= B):
        print(i)

### FIXED CODE ###

A,B,K = map(int, raw_input().split())
  
for i in range(K):
    if A + i >= A and A + i <= B:
        print(A + i)
for i in range(K):
    if B - K + 1 + i >= A and B - K + 1 + i <= B and B - K + 1 + i > A + K -1:
        print(B - K + 1 + i)
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))
N = int(input())
light_rule = {n:int(input())-1 for n in range(N)}

light = ["1"]+["0"]*(N-1)

flag = 0
num = 0
bottun = 0
for _ in range(1e6):
    if light[1] == "1":
        flag = 1
        break
    num += 1
    # print(bottun, light_rule[bottun])
    light[bottun] = "0"
    light[light_rule[bottun]] = "1"
    bottun = light_rule[bottun]
    # print(light)
    
if flag:
    print(num)
else:
    print(-1)

### FIXED CODE ###

N = int(input())
light_rule = {n:int(input())-1 for n in range(N)}

light = ["1"]+["0"]*(N-1)

flag = 0
num = 0
bottun = 0
for _ in range(N):
    if light[1] == "1":
        flag = 1
        break
    num += 1
    # print(bottun, light_rule[bottun])
    light[bottun] = "0"
    light[light_rule[bottun]] = "1"
    bottun = light_rule[bottun]
    # print(light)
    
if flag:
    print(num)
else:
    print(-1)
n,m,*L = map(int,open(0).read().split())
mod = 10**9+7

dp = [0]*(n)
if 1 in L:
    dp[0] = 0
    dp[1] = 1
elif 1 not in L:
    dp[0] = 1
    dp[1] = 2

for i in range(2,n):
    if i+1 in L:
        continue
    dp[i] = (dp[i-1] + dp[i-2])%mod
    
print(dp[n-1])

### FIXED CODE ###

n,m = map(int,input().split())
li = [int(input()) for i in range(m)]

st = [1]*(n+1)
for i in range(m):
    st[li[i]-1] = 0

if st[0] == 0 and st[1] == 0:
    print(0)
    exit()
elif st[0] == 0 and st[1] != 0:
    st[1] = 1
elif st[0] == 1 and st[1] != 0:
    st[1] = 2

for i in range(2,n+1):
    if st[i] == 0:
        continue
    else:
        st[i] = (st[i-1] + st[i-2])%1000000007
print(st[n-1])
import math
lis=[]
for n in range(200):
    nums = list(map(int, input().split()))
    if nums==[]:
        break
    else:
        if nums[0]==0:
            a=1
        else:
            a = int(1.0+math.log(nums[0],10))
        if nums[1]==0:
            b=1
        else:
            b = int(1.0+math.log(nums[1],10))
        lis.append(a+b)    
for i in lis:            
    print(i)

### FIXED CODE ###

import math
import sys

for line in sys.stdin:
    words=line.strip().split(" ")
    a=int(words[0])
    b=int(words[1])
    c=a+b
    if c!=0:
        print(int(1.0000001+math.log(c,10)))
    else:
        print(1)