Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

s = input()
t = input()
ls, lt = len(s), len(t)

dp_list = [ [ "" for i in range(ls+1) ] for j in range(lt+1) ]

for i in range(lt):
    for j in range(ls):
        if t[i] == s[j]:
            a = dp_list[i][j] + t[i]
            b = dp_list[i+1][j]
            c = dp_list[i][j+1]
            p = list(map(len,[a,b,c])).index(max(map(len,[a,b,c])))
            
            dp_list[i+1][j+1] = [a,b,c][p]
        else:
            a = dp_list[i][j]
            b = dp_list[i+1][j]
            c = dp_list[i][j+1]
            p = list(map(len,[a,b,c])).index(max(map(len,[a,b,c])))
            
            dp_list[i+1][j+1] = [a,b,c][p]

print(dp_list[-1][-1])


### FIXED CODE ###

s = input()
t = input()
ls, lt = len(s), len(t)

dp_list = [ [ 0 for i in range(ls+1) ] for j in range(lt+1) ]
index_list = [ [ None for i in range(ls) ] for j in range(lt) ]

for i in range(lt):
    for j in range(ls):
        if t[i] == s[j]:
            a = dp_list[i+1][j]
            b = dp_list[i][j+1]
            c = dp_list[i][j] + 1 
            p = [a,b,c].index(max(a,b,c))
            dp_list[i+1][j+1] = [a,b,c][p]
            index_list[i][j] = (1,p)

        else:
            a = dp_list[i+1][j]
            b = dp_list[i][j+1]
            p = [a,b].index(max(a,b))
            dp_list[i+1][j+1] = [a,b][p]
            index_list[i][j] = (0,p)

q = dp_list[-1][-1]
r = t   

a = 10**5

ans = ""
y, x = lt-1, ls-1
while y != -1 and x != -1:
    if index_list[y][x][1] == 2:
        x -= 1
        y -= 1
        ans += s[x+1]
    elif index_list[y][x][1] == 1:
        y -= 1
    elif index_list[y][x][1] == 0:
        x -= 1

print(ans[::-1])
### BUGGY CODE ###

s=input()
t=input()
res=0
if len(set(t)-set(s)) > 0:
    res=-1
else:
    pos={}
    set_t=set(t)
    for e_t in t:
        pos[e_t]=[]
    for i in range(len(s)):
        if s[i] in set_t:
            pos[s[i]].append(i+1)
    cur = 0
    nxt=0
    for i in range(len(t)):
        for e in pos[t[i]]:
            if e > cur:
                nxt=e
                break
        if nxt == cur:
            nxt = pos[t[i]][0]
            res+=len(s)
        cur=nxt
    res+=cur
print(res)

### FIXED CODE ###

s=input()
t=input()
import bisect
res=0
if len(set(t)-set(s)) > 0:
    res=-1
else:
    pos={}
    set_t=set(t)
    for e_t in t:
        pos[e_t]=[]
    for i in range(len(s)):
        if s[i] in set_t:
            pos[s[i]].append(i+1)
    cur = 0
    nxt=0
    for e_t in t:
        nxt=bisect.bisect_left(pos[e_t], cur+1)
        if nxt < len(pos[e_t]):
            cur=pos[e_t][nxt]
        else:
            cur=pos[e_t][0]
            res+=len(s)
    res+=cur
print(res)
### BUGGY CODE ###

n = int(input())
a = [int(i) for i in input().split()]
mod = 10 ** 9 + 7

ans = 0
for i in range(n - 1):
    for j in range(i + 1, n):
        ans += a[i] ^ a[j]
        ans %= mod
print(ans)

### FIXED CODE ###

import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def LIST(): return list(map(int, input().split()))
mod = 10 ** 9 + 7

n = INT()
a = LIST()
arr = [0 for _ in range(61)]
for i in range(n):
    ai = a[i]
    for j in reversed(range(61)):
        arr[j] += ai % 2
        ai //= 2
ans = 0
for i in range(61):
    ans *= 2
    arri = arr[i]
    ans += arri * (n - arri if arri != 0 else 0)
    ans %= mod
print(ans)
### BUGGY CODE ###

from collections import defaultdict
import sys
input = sys.stdin.readline


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)

    if temp != 1:
        arr.append(temp)

    return arr


def main():
    n = int(input())
    A = list(map(int, input().split()))
    fact_dict = defaultdict(int)
    for a in A:
        facts = factorization(a)
        for fact in facts:
            fact_dict[fact] += 1

    if not fact_dict.values():
        count = 1
    else:
        count = max(fact_dict.values())
    if count == 1:
        print("pairwise coprime")
    elif count != n:
        print("setwise coprime")
    else:
        print("not coprime")


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
input = sys.stdin.readline


def main():
    n = int(input())
    A = list(map(int, input().split()))

    counts = [0] * (10**6 + 1)
    for a in A:
        counts[a] += 1

    ans = 1
    for i in range(2, 10**6+1):
        co_primes = 0
        for j in range(i, 10**6+1, i):
            co_primes += counts[j]
        if ans < co_primes:
            ans = co_primes

    if ans == 1:
        print("pairwise coprime")
    elif ans < n:
        print("setwise coprime")
    else:
        print("not coprime")


if __name__ == "__main__":
    main()
### BUGGY CODE ###

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

if 0 in A:
    print(0)
    exit(0)

total = 1
for i in range(N):
    total *= A[i]

if total > 10 ** 18:
    print(-1)
else:
    print(total)

### FIXED CODE ###

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

    if 0 in A:
        print(0)
        exit(0)

    total = 1
    for a in A:
        total *= a

        if total > 10 ** 18:
            print(-1)
            exit(0)
    print(total)

if __name__ == '__main__':
    main()
### BUGGY CODE ###

import numpy as np
n, w = list(map(int, input().split()))
data = []
for i in range(n):
    data.append(list(map(int, input().split())))
dp = np.zeros((n + 1,w + 1))
for i in range(n):
    for j in range(w+1):
        if data[i][0] > j:
            dp[i][j] = max(dp[i - 1][j], dp[i][j - 1])
        else:
            dp[i][j] = max(dp[i - 1][j], dp[i - 1][j - data[i][0]] + data[i][1])
print(int(dp[n - 1][w]))

### FIXED CODE ###

n, W = list(map(int, input().split()))
w = [0 for i in range(n + 1)]
v = [0 for i in range(n + 1)]
for i in range(n):
    w[i + 1], v[i + 1] = list(map(int, input().split()))
dp = [[0 for i in range(W+1)] for j in range(n+1)]
for i in range(1,n+1):
    for j in range(1,W+1):
        if w[i] > j:
            dp[i][j] = dp[i - 1][j]
        else:
            dp[i][j] = max(dp[i - 1][j], dp[i - 1][j - w[i]] + v[i])
print(int(dp[n][W]))
### BUGGY CODE ###

H, W = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(H)]
B = [list(map(int, input().split())) for _ in range(H)]
C = [[abs(A[i][j] - B[i][j]) for j in range(W)] for i in range(H)]

dp = [[[False] * 12801 for j in range(W)] for _ in range(H)]
dp[0][0][C[0][0]] = True
for i in range(H):
    for j in range(W):
        if i == j == 0:
            continue
        for n in range(12801):
            if i > 0 and dp[i-1][j][n] or j > 0 and dp[i][j-1][n]:
                dp[i][j][abs(n-C[i][j])] = True
                dp[i][j][abs(n+C[i][j])] = True

for n in range(12801):
    if dp[H-1][W-1][n]:
        print(n)
        break

### FIXED CODE ###

H, W = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(H)]
B = [list(map(int, input().split())) for _ in range(H)]
C = [[abs(A[i][j] - B[i][j]) for j in range(W)] for i in range(H)]

M = (H+W)*80
dp = [[0] * W for _ in range(H)]
dp[0][0] |= 1 << (M-C[0][0])
for i in range(H):
    for j in range(W):
        if i == j == 0:
            continue
        bit = 0
        if i > 0:
            bit |= dp[i-1][j]
        if j > 0:
            bit |= dp[i][j-1]
        dp[i][j] = (bit >> C[i][j]) | (bit << C[i][j])
ans = M
for i in range(M+1):
    if (dp[-1][-1] >> i) & 1:
        ans = min(ans, abs(M-i))
print(ans)
### BUGGY CODE ###

from bisect import bisect_left

class SegmentTree:
    def __init__(self, N):
        self.N = 2 * pow(2, N.bit_length()) - 1
        self.data = [0 for _ in range(2*self.N)]
    
    def update(self, k, x):
        k += self.N-1
        self.data[k] = x
        while k >= 0:
            k = (k - 1) // 2
            self.data[k] = sum([self.data[2*k+1], self.data[2*k+2]])
    
    # [l,r)
    def query(self, l, r):
        L = l + self.N
        R = r + self.N
        s = 0
        while L < R:
            if R & 1:
                R -= 1
                s = sum([s, self.data[R-1]])
            if L & 1:
                s = sum([s, self. data[L-1]])
                L += 1
            L >>= 1; R >>= 1
        return s

    def node(self, k):
        return st.query(k, k+1)

def compress(arr):
    N = len(arr)
    narr = sorted(arr)
    pressed = [-1] * N
    for i in range(N):
        pressed[i] = bisect_left(narr, arr[i])
    return pressed
    

def accmulate(arr):
    N = len(arr)
    cs = [0]*(N+1)
    for i in range(N):
        cs[i+1] = cs[i] + arr[i]
    return cs

# [l,r)
def query(cs, l, r):
    return cs[r] - cs[l]

N, K = map(int,input().split())
A = [int(input()) - K for _ in range(N)]

cs = accmulate(A)
cs = compress(cs)
st = SegmentTree(N)

ans = 0

for i in range(N+1):
    ans += st.query(0, cs[i] + 1)
    st.update(cs[i], st.node(cs[i]) + 1)

print(ans)

### FIXED CODE ###

from bisect import bisect_left

class SegmentTree:
    def __init__(self, N):
        self.N = 2 * pow(2, N.bit_length()) - 1
        self.data = [0 for _ in range(2*self.N)]
    
    def update(self, k, x):
        k += self.N-1
        self.data[k] = x
        while k >= 0:
            k = (k - 1) // 2
            self.data[k] = sum([self.data[2*k+1], self.data[2*k+2]])
    
    # [l,r)
    def query(self, l, r):
        L = l + self.N
        R = r + self.N
        s = 0
        while L < R:
            if R & 1:
                R -= 1
                s = sum([s, self.data[R-1]])
            if L & 1:
                s = sum([s, self. data[L-1]])
                L += 1
            L >>= 1; R >>= 1
        return s

    def node(self, k):
        return st.query(k, k+1)

def compress(arr):
    N = len(arr)
    narr = sorted(arr)
    pressed = [-1] * N
    for i in range(N):
        pressed[i] = bisect_left(narr, arr[i])
    return pressed
    

def accmulate(arr):
    N = len(arr)
    cs = [0]*(N+1)
    for i in range(N):
        cs[i+1] = cs[i] + arr[i]
    return cs

# [l,r)
def query(cs, l, r):
    return cs[r] - cs[l]

N, K = map(int,input().split())
A = [int(input()) - K for _ in range(N)]

cs = accmulate(A)
cs = compress(cs)
st = SegmentTree(N)

ans = 0

for i in range(N+1):
    ans += st.query(0, cs[i] + 1)
    st.update(cs[i], st.node(cs[i]) + 1)

print(ans)
### BUGGY CODE ###

length = int(input())
suretsu=[int(input()) for i in range(length)]
result = []
for i in range(length):
    pop_suretsu = suretsu[0:i] + suretsu[i+1:]
    result.append(str(max(pop_suretsu)))
print('\n'.join(result))

### FIXED CODE ###

length = int(input())
suretsu=[int(input()) for i in range(length)]
result = []
sorted_suretsu = sorted(suretsu,reverse=True)
zantei_max = sorted_suretsu[0]

for i in range(length):
    if (zantei_max == suretsu[i]):
        result.append(str(sorted_suretsu[1]))
    else:
        result.append(str(zantei_max))
print('\n'.join(result))
### BUGGY CODE ###

from functools import reduce
n = (int)(input())
a = (list)(map(int, input().split()))


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


def calcMod(a, m):
  return sum([m % v for v in a])


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


def lcm_list(l):
  g = reduce(lcm, l)
  return g


print(calcMod(a, (int)(lcm_list(a)-1)))


### FIXED CODE ###

from functools import reduce
n = (int)(input())
a = (list)(map(int, input().split()))


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


def calcMod(a, m):
  return sum([m % v for v in a])


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


def lcm_list(l):
  g = reduce(lcm, l)
  return g


def mul(a, b):
  return a*b


#print(calcMod(a, (int)(lcm_list(a)-1)))
print(calcMod(a, reduce(mul, a)-1))
### BUGGY CODE ###

k,s=map(int,input().split())
cnt=0
for n in range(k+1):
    for m in range(k+1):
        for j in range(k+1):
            if n+m+j==s:
                cnt+=1
print(cnt)

### FIXED CODE ###

k,s=map(int,input().split())
cnt=0
for x in range(k+1):
    for y in range(k+1):
        l=s-(x+y)
        if 0<=l<=k:
            cnt+=1
print(cnt)
### BUGGY CODE ###

H, W = map(int, input().split())
rows = [input() for i in range(H)]
cols = []
for i in range(W):
    col = ''
    for row in rows:
        col += row[i]
    cols.append(col)

def create_light_list(tdl, reverse):
    ret = []
    for l in tdl:
        lenl = len(l)
        items = []
        cur = 0
        if reverse:
            tl = range(lenl)[::-1]
        else:
            tl = range(lenl)
        for i in tl:
            if l[i] == '#':
                cur = 0
                items.append(cur)
            else:
                cur += 1
                items.append(cur)
        if reverse:
            ret.append(items[::-1])
        else:
            ret.append(items)
    return ret

# 上下左右の照らされる数だけをあらかじめ計算
L = create_light_list(rows, False)
R = create_light_list(rows, True)
U = create_light_list(cols, False)
D = create_light_list(cols, True)

ans = 0
for i in range(H):
    for j in range(W):
        light = L[i][j] + R[i][j] + U[j][i] + D[j][i] - 3
        ans = max(ans, light)

print(ans)


### FIXED CODE ###

H, W = map(int, input().split())
S = [input() for _ in range(H)]
L, R, U, D = [[[0]*W for _ in range(H)] for i in range(4)]

for h in range(H):
    for w in range(W):
        if S[h][w] == '.':
            L[h][w] = L[h][w-1]+1
            U[h][w] = U[h-1][w]+1
        if S[h][W-1-w] == '.':
            R[h][-w-1] = R[h][-w]+1
        if S[H-1-h][w] == '.':
            D[-h-1][w] = D[-h][w]+1

ans = 0
for i in range(H):
    for j in range(W):
        light = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3
        ans = max(ans, light)

print(ans)
### BUGGY CODE ###

n=int(input())
S=[list(input()) for _ in range(n)]
Ds=[]
cnt=0; c=0
for s in S:
    d={}
    for t in s:
        if t not in d.keys(): d[t]=1
        else: d[t]+=1
    Ds.append(d)

for i in range(n):
    for j in range(i+1,n):
        if i==j: continue
        for k in Ds[i].keys():
            if k not in Ds[j].keys():c=0; break
            if Ds[i][k]!=Ds[j][k]:c=0; break
            c=1
        if c==1: cnt+=1
print(cnt)

### FIXED CODE ###

n=int(input())
dic={}
ans=0
for _ in range(n):
    S=''.join(sorted(list(input())))
    if S not in dic.keys():
        dic[S]=1
    else:
        ans+=dic[S]
        dic[S]+=1
print(ans)
### BUGGY CODE ###

import itertools
import math

n,m,q = map(int,input().split())

memo = []
number = []
for i in range(m):
    number.append(i+1)
len = m

for j in range(math.factorial(n+m-1)//(math.factorial(n)*math.factorial(m-1))):
    memo.append(0)

a = list(itertools.combinations_with_replacement(number,n))
for i in range(q):
    num = list(map(int,input().split()))
    for j in range(math.factorial(n+m-1)//(math.factorial(n)*math.factorial(m-1))):
        if int(a[j][num[1]-1])-int(a[j][num[0]-1]) == int(num[2]):
            memo[j] += num[3]
print(max(memo))



### FIXED CODE ###

import itertools

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

number = []
for i in range(m):
    number.append(i+1)
a = list(itertools.combinations_with_replacement(number,n))
length = len(a)
memo = [0] * length
ans = 0

for i in range(length):#組み合わせの数回す
    sum = 0
    for j in range(q):
       if a[i][num[j][1]-1] - a[i][num[j][0]-1]  == num[j][2]:
            sum += num[j][3]
    ans = max(sum,ans)
print(ans)
### BUGGY CODE ###

n=int(input())
a=list(map(int,input().split()))
INF=10**9+7
md=len(bin(max(a)))
ans=0
for i in range(md):
  cnt1=sum([1 for j in a if (j>>i)&1])
  ans+=cnt1*(n-cnt1)*(1<<i)
  ans%=INF
print(ans%INF)

### FIXED CODE ###

import numpy as np
n=int(input())
a=np.array([int(i) for i in input().split()])
mod=int(1e9+7)
ans=0
for k in range(60):
  b=(a>>k)&1
  m=np.count_nonzero(b)
  ans+=m*(n-m)*2**k
  ans%=mod
print(ans)
### BUGGY CODE ###

N = input()
a = input().split()
import numpy as np
a = np.array(a).astype(int).tolist()
s = []
count = 0
al = False
while(1):
    s = []
    al = False
    for aa in a:
        if aa % 2 == 0:
            s.append(True)
        else:
            s.append(False)
    #print(s)
    if np.count_nonzero(s) == 0:
        break
    count = count + 1
    for i,ss in enumerate(s):
        if ss and not al:
            a[i] = a[i] / 2
            al = True
        elif not ss or al:
            a[i] = a[i];
    
print(count)

### FIXED CODE ###

N = input()
a = input().split()
import numpy as np
a = np.array(a).astype(int).tolist()
count = 0
for aa in a:
    #n = np.log2(a)
    while(True):
        if aa % 2 == 0:
            aa = aa / 2
            count = count + 1
        else :
            break;
    
print(int(count))
### BUGGY CODE ###

import sys
sys.setrecursionlimit(10 ** 9)

n, m = map(int, input().split())
edges = [[] for _ in range(n)]
for _ in range(m):
    x, y = map(int, input().split())
    edges[y - 1].append(x - 1)
used = [False for _ in range(n)]
dp = [0 for _ in range(n)]

def dfs(pos):
    if not edges[pos]:
        dp[pos] = 0
        return
    for n_pos in edges[pos]:
        if not used[n_pos]:
            dfs(n_pos)
        dp[pos] = max(dp[pos], dp[n_pos] + 1)

for i in range(n):
    if used[i]:
        continue
    used[i] = True
    dfs(i)
    
print(max(dp))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.buffer.readline

def main():
    n, m = map(int, input().split())
    edges = [[] for _ in range(n)]
    for _ in range(m):
        x, y = map(int, input().split())
        edges[y - 1].append(x - 1)
    used = [False for _ in range(n)]
    dp = [0 for _ in range(n)]
    
    def dfs(pos):
        if not edges[pos]:
            dp[pos] = 0
            return
        for n_pos in edges[pos]:
            if not used[n_pos]:
                dfs(n_pos)
            used[n_pos] = True
            dp[pos] = max(dp[pos], dp[n_pos] + 1)
            
    
    for i in range(n):
        if used[i]:
            continue
        used[i] = True
        dfs(i)
        
    print(max(dp))

main()
### BUGGY CODE ###

# diverta 2019 Programming Contest: B – RGB Boxes
R, G, B, N = [int(i) for i in input().split()]

bingo = 0

for r in range(0, 3001):
    for g in range(0, 3001):
        b = (N -(R * r + G * g)) // B
        if b >= 0 and  R * r + G * g + B * b == N:
            bingo += 1

print(bingo)

### FIXED CODE ###

# diverta 2019 Programming Contest: B – RGB Boxes
R, G, B, N = [int(i) for i in input().split()]

bingo = 0

for r in range(0, 3001):
    if R * r > N:
        break
    else:
        for g in range(0, 3001):
            b = (N -(R * r + G * g)) // B
            if b < 0:
                break
            elif R * r + G * g + B * b == N:
                bingo += 1

print(bingo)
### BUGGY CODE ###

n,q = [int(i) for i in input().split()]
s = input()
ac_loc = []
for i in range(n-1):
  if s[i] =='A':
    if s[i+1] == 'C':
      ac_loc.append(i)
      i+=1 

for i in range(q):
  l, r = [int(j) for j in input().split()]
  l -= 1
  r -= 1
  ans = sum((l<=j and j+1<=r) for j in ac_loc)
  print(ans)

### FIXED CODE ###

n,q = [int(i) for i in input().split()]
s = input()
l = []
r = []
for i in range(q):
  l_tmp, r_tmp = [int(j) for j in input().split()]
  l.append(l_tmp-1)
  r.append(r_tmp-1)
  
ac_cnt = s.count('AC')
r_cnt = [ac_cnt]
l_cnt = [0]
for i in range(1,n):
  if s[i-1:i+1] == 'AC':
    r_cnt.append(r_cnt[i-1]-1)
    l_cnt.append(l_cnt[i-1]+1)
  else:
    r_cnt.append(r_cnt[i-1])
    l_cnt.append(l_cnt[i-1])
    
for i in range(q):
  ans = r_cnt[l[i]] + l_cnt[r[i]] - ac_cnt
  print(ans)
### BUGGY CODE ###

#067-D
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return input()

n=I()
prev=[-1 for i in range(n)]
nl=[[] for i in range(n)]
q=[0]
vis=[False for i in range(n)]

for i in range(n-1):
    a,b=IL()
    nl[a-1].append(b-1)
    nl[b-1].append(a-1)

def bfs(s):
    vis[s]=True
    for v in nl[s]:
        if not vis[v]:
            prev[v]=s
            q.append(v)
    return

while len(q)!=0:
    s=q.pop(0)
    bfs(s)

path=[n-1]
while True:
    if path[-1]==0:
        break
    path.append(prev[path[-1]])
path.reverse()
    
for i in range(1,n):
    while True:
        if prev[i] in path:
            break
        prev[i]=prev[prev[i]]

if len(path)%2==0:
    fenp=path[:len(path)//2]
    fen=len(path)//2
else:
    fenp=path[:len(path)//2+1]
    fen=len(path)//2+1

snu=len(path)-fen

for i in range(n):
    if i not in path:
        if prev[i] in fenp:
            fen+=1
        else:
            snu+=1
    
if fen>snu:
    print("Fennec")
else:
    print("Snuke")

### FIXED CODE ###

#067-D
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return input()

n=I()
nl=[[] for i in range(n)]
distfen=[-1 for i in range(n)]
distsnu=[-1 for i in range(n)]

for i in range(n-1):
    a,b=IL()
    nl[a-1].append(b-1)
    nl[b-1].append(a-1)
    
q=[[0,0]]
vis=[False for i in range(n)]
while len(q)!=0:
    s,d=q.pop(0)
    vis[s]=True
    for v in nl[s]:
        if not vis[v]:
            distfen[v]=d+1
            q.append([v,d+1])

q=[[n-1,0]]
vis=[False for i in range(n)]
while len(q)!=0:
    s,d=q.pop(0)
    vis[s]=True
    for v in nl[s]:
        if not vis[v]:
            distsnu[v]=d+1
            q.append([v,d+1])
        
fen=0
snu=0

for i in range(1,n-1):
    if distfen[i]<=distsnu[i]:
        fen+=1
    else:
        snu+=1

if fen>snu:
    print("Fennec")
else:
    print("Snuke")
### BUGGY CODE ###

from functools import reduce
import fractions
n, m = map(int, input().split())
a = [int(x)//2 for x in input().split()]


def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


y = lcm_list(a)

for i in range(n):
    if (y // a[i]) % 2 == 0:
        print(0)
        exit()

x = m//y
if x % 2 == 0:
    print(x//2)
else:
    print((x+1)//2)


### FIXED CODE ###

from functools import reduce
import fractions
n, m = map(int, input().split())
a = [int(x)//2 for x in input().split()]

y = a[0]

for i in range(1,n):
    y = y*a[i] // fractions.gcd(y,a[i])
    if y > m:
        print(0)
        exit()

for i in range(n):
    if (y // a[i]) % 2 == 0:
        print(0)
        exit()

x = m//y

if x % 2 == 0:
    print(x//2)
else:
    print((x+1)//2)
### BUGGY CODE ###

# resolve after read answer

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

# count = 0
# for i in range(1000):
#     v = str(i).zfill(3)
#     k=0
#     for j in range(n):
#         if v[k] == s[j]:
#             k+=1
#         if k==3:
#             count+=1
#             break

# print(count)

# dp
dp = [[[False] * 30009 for i in range(4)] for j in range(1009)]
dp[0][0][0]=True
cnt=0
for i in range(n):
    for j in range(4):
        for k in range(1000):
            if dp[i][j][k] == False:
                continue
            dp[i+1][j][k] = True
            if(j<=2):
                dp[i+1][j+1][k*10+int(s[i])]=True
    for i in range(1000):
        if(dp[n][3][i]==True):
            cnt+=1
print(cnt)


### FIXED CODE ###

n = int(input())
s = input()
count = 0
for i in range(1000):
    v = str(i).zfill(3)
    k=0
    for j in range(n):
        if v[k] == s[j]:
            k+=1
        if k==3:
            count+=1
            break

print(count)
### BUGGY CODE ###

N=int(input())
v=100
count=0
while True:
  if N<v:
    break
  count+=1
  v*=1.01//1

### FIXED CODE ###


N=int(input())
v=100
count=0

while True:
  if N<=v:
    break
  count+=1
  v*=1.01
  v=int(v)
print(count)