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

import sys
input = sys.stdin.readline
n, m = [int(x) for x in input().strip().split()]
a = sorted(list(set([int(x)//2 for x in input().strip().split()])))
lcm_d = {}
gcd_d = {}
def lcm(a, b, d, dd):
    if (a, b) in d:
        return d[(a, b)]
    ret = a * b // gcd(a, b, dd)
    ret_ = ret
    if gcd(a, b, dd) != 1:
        while (ret // a) % 2 == 0 or (ret // b) % 2 == 0:
            ret += ret_
    d[(a, b)] = ret
    return ret

def gcd(a, b, d):
    if (a, b) in d:
        return d[(a, b)]
    if b == 0:
        return a
    d[(a, b)] = gcd(b, a % b, d)
    return d[(a, b)]

lcm_ = a[0]
for aa in a[1:]:
    lcm_ = lcm(aa, lcm_, lcm_d, gcd_d)

print((m // lcm_ + 1) // 2)

### FIXED CODE ###

import sys
input = sys.stdin.readline
n, m = [int(x) for x in input().strip().split()]
a = list(set([int(x)//2 for x in input().strip().split()]))

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

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

def div2cnt(x):
    ret = 0
    while x % 2 == 0:
        ret += 1
        x //= 2
    return ret

cnt = div2cnt(a[0])

for i, aa in enumerate(a):
    if div2cnt(aa) != cnt:
        print(0)
        exit()
    a[i] >>= cnt
else:
    m >>= cnt

lcm_ = 1
for aa in a:
    lcm_ = lcm(lcm_, aa)
    if lcm_ > m:
        print(0)
        exit()

print((m // lcm_ + 1) // 2)
### BUGGY CODE ###

import math
K = int(input())
ans = 0
for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            f = math.gcd(math.gcd(i, j), k)
            ans += f
print(ans)

### FIXED CODE ###

from math import gcd
K = int(input())
ans = 0
for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            ans += gcd(gcd(i, j), k)
print(ans)
### BUGGY CODE ###

n = int(input())
a = [list(map(int, input().split())) for _ in range(n)]
mod = 10 ** 9 + 7

dp = [0] * (1 << n)
dp[0] = 1

bitcount = [0]
for _ in range(n):
    bitcount += [i+1 for i in bitcount]

# 集めるDP
for bit in range(1,1 << n):
    i = bitcount[bit]
    for j in range(n):
        if ((bit >> j) & 1 == 1) and (a[i - 1][j] == 1):
            dp[bit] += dp[bit ^ (1 << j)]
    dp[bit] %= mod
print(dp[-1])


### FIXED CODE ###

mod = 10**9+7
n = int(input())
a = [list(map(int, input().split())) for i in range(n)]
dp = [0]*(1 << n)
dp[0] = 1
for i in range(1, 1 << n):
    k = bin(i).count("1")
    for j in range(n):
        if i >> j & 1 and a[k-1][j]:
            dp[i] += dp[i ^ (1 << j)]
    dp[i] %= mod
print(dp[(1 << n)-1])
### BUGGY CODE ###

import sys
input = lambda: sys.stdin.readline().rstrip('\r\n')

N, Q = map(int, input().split())
C = list(map(int, input().split()))

B = max(1, int(N**.5))

Qs = []
for i in range(Q):
	l, r = map(lambda s: int(s)-1, input().split())
	Qs.append((l, r+1, i))

Qs.sort(key=lambda v: (v[0]//B, v[1] ^ -(v[0]//B & 1)))

cnt = [0] * (N+1)
diff = 0

ans = [-1] * Q

left, right = 0, 0

def add(i):
	global cnt, diff
	x = C[i]
	cnt[x] += 1
	if cnt[x] == 1:
		diff += 1

def remove(i):
	global cnt, diff
	x = C[i]
	cnt[x] -= 1
	if cnt[x] == 0:
		diff -= 1

for l, r, i in Qs:
	while right < r:
		add(right)
		right += 1

	while r < right:
		right -= 1
		remove(right)

	while left < l:
		remove(left)
		left += 1

	while l < left:
		left -= 1
		add(left)

	ans[i] = diff

print('\n'.join(map(str, ans)))


### FIXED CODE ###

import sys
input = lambda: sys.stdin.readline().rstrip('\r\n')

N, Q = map(int, input().split())
C = list(map(int, input().split()))

by_R = [[] for _ in range(N+1)]
for i in range(Q):
	l, r = map(lambda s: int(s)-1, input().split())
	by_R[r+1].append((l, i))

s = [0] * N
def update(pos, dif):
	while pos < N:
		s[pos] += dif
		pos |= pos + 1

def query(pos):
	res = 0
	while pos > 0:
		res += s[pos-1]
		pos &= pos - 1
	return res

diff = 0
ans = [-1] * Q
last = [-1] * (N+1)

for i, v in enumerate(C):
	if last[v] != -1:
		update(last[v], -1)
	else:
		diff += 1

	update(i, 1)
	last[v] = i

	for l, j in by_R[i+1]:
		ans[j] = diff - query(l)

print('\n'.join(map(str, ans)))
### BUGGY CODE ###

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


def calc_dist(s, start_i, start_j, goal_i, goal_j, h, w):
    from collections import deque

    result = 0
    d = deque()
    d.append((start_i, start_j))
    dist = [[0 for _ in range(w)] for _ in range(h)]
    visited = [[False for _ in range(w)] for _ in range(h)]
    visited[start_i][start_j] = True
    dxy = [(1, 0), (-1, 0), (0, -1), (0, 1)]

    while d:
        hd, wd = d.popleft()

        for dx, dy in dxy:
            nx = wd + dx
            ny = hd + dy

            if nx < 0 or nx >= w or ny < 0 or ny >= h:
                continue

            if s[ny][nx] == '#':
                continue

            if visited[ny][nx]:
                continue

            visited[ny][nx] = True
            dist[ny][nx] = dist[hd][wd] + 1
            d.append((ny, nx))

            if nx == goal_j and ny == goal_i:
                for i in range(h):
                    for j in range(w):
                        result = max(result, dist[i][j])

                return result

    return result


def main():
    h, w = map(int, input().split())
    s = [list(input()) for _ in range(h)]
    ans = 0

    for start_i in range(h):
        for start_j in range(w):
            for goal_i in range(h):
                for goal_j in range(w):
                    if s[start_i][start_j] == '#':
                        continue

                    if s[goal_i][goal_j] == '#':
                        continue

                    ans = max(ans, calc_dist(s, start_i, start_j, goal_i, goal_j, h, w))

    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

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


def calc_dist(s, start_i, start_j, h, w):
    from collections import deque

    result = 0
    d = deque()
    d.append((start_i, start_j))
    dist = [[0 for _ in range(w)] for _ in range(h)]
    visited = [[False for _ in range(w)] for _ in range(h)]
    visited[start_i][start_j] = True
    dxy = [(1, 0), (-1, 0), (0, -1), (0, 1)]

    while d:
        hd, wd = d.popleft()

        for dx, dy in dxy:
            nx = wd + dx
            ny = hd + dy

            if nx < 0 or nx >= w or ny < 0 or ny >= h:
                continue

            if s[ny][nx] == '#':
                continue

            if visited[ny][nx]:
                continue

            visited[ny][nx] = True
            dist[ny][nx] = dist[hd][wd] + 1
            d.append((ny, nx))
            result = max(result, dist[ny][nx])

    return result


def main():
    h, w = map(int, input().split())
    s = [list(input()) for _ in range(h)]
    ans = 0

    # KeyInsight
    # 始点のみを全探索(終点は全探索する必要はない)
    # 距離はBFSで計算
    for start_i in range(h):
        for start_j in range(w):
            if s[start_i][start_j] == '#':
                continue

            ans = max(ans, calc_dist(s, start_i, start_j, h, w))

    print(ans)


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

K = int(input())

def calculate(k):

    res = 1

    n = 7

    if k % 2 == 0:
        print(-1)
        return

    if k % 5 == -1:
        print(-1)
        return

    while True:
        if n % k == 0:
            break
        n = (n % k) * 10 + 7
        res += 1

    print(res)

calculate(K)

### FIXED CODE ###

K = int(input())

def calculate(k):

    if k % 2 == 0:
        print(-1)
        return

    if k % 5 == 0:
        print(-1)
        return

    res = 1

    m = (((10 ** res) - 1) // 9) * 7


    while m % k > 0:
        res += 1
        m = m % k
        m = m * 10 + 7

    print(res)


calculate(K)
### BUGGY CODE ###

class DisjointSet:
    def __init__(self):
        self.rank = {}
        self.p = {}

    def makeSet(self, x):
        self.p[x] = x
        self.rank[x] = 0

    def same(self, x, y):
        return self.findSet(x) == self.findSet(y)

    def unite(self, x, y):
        self.link(self.findSet(x), self.findSet(y))

    def link(self, x, y):
        if(self.rank[x] > self.rank[y]):
            self.p[y] = x
        else:
            self.p[x] = y
            if(self.rank[x] == self.rank[y]):
                self.rank[y] += 1

    def findSet(self, x):
        if(x != self.p[x]):
            self.p[x] = self.findSet(self.p[x])
        return self.p[x]

H, W = map(int, input().split())
S = [list(input()) for i in range(H)]

ds = DisjointSet()
for i in range(H):
    for j in range(W):
        ds.makeSet((i,j))

for i in range(H):
    for j in range(W):
        if i + 1 < H and S[i][j] != S[i+1][j]:
            ds.unite((i,j), (i+1, j))
        if 0 <= i - 1 and S[i][j] != S[i-1][j]:
            ds.unite((i,j), (i-1, j))
        if j + 1 < W and S[i][j] != S[i][j+1]:
            ds.unite((i,j), (i, j+1))
        if 0 <= j - 1 and S[i][j] != S[i][j-1]:
            ds.unite((i,j), (i, j-1))

from collections import defaultdict

c1 = defaultdict(int)
c2 = defaultdict(int)

for i in range(H):
    for j in range(W):
        if S[i][j] == '.':
            c1[ds.findSet((i,j))] += 1
        else:
            c2[ds.findSet((i,j))] += 1
ans = 0
for i in c1.keys():
    ans += c1[i] * c2[i]
print(ans)

### FIXED CODE ###

class DisjointSet:
    def __init__(self):
        self.rank = {}
        self.p = {}

    def makeSet(self, x):
        self.p[x] = x
        self.rank[x] = 0

    def same(self, x, y):
        return self.findSet(x) == self.findSet(y)

    def unite(self, x, y):
        self.link(self.findSet(x), self.findSet(y))

    def link(self, x, y):
        if(self.rank[x] > self.rank[y]):
            self.p[y] = x
        else:
            self.p[x] = y
            if(self.rank[x] == self.rank[y]):
                self.rank[y] += 1

    def findSet(self, x):
        if(x != self.p[x]):
            self.p[x] = self.findSet(self.p[x])
        return self.p[x]

H, W = map(int, input().split())
S = [list(input()) for i in range(H)]

ds = DisjointSet()
for i in range(H):
    for j in range(W):
        ds.makeSet((i,j))

for i in range(H):
    for j in range(W):
        if i + 1 < H and S[i][j] != S[i+1][j]:
            ds.unite((i,j), (i+1, j))
        if 0 <= i - 1 and S[i][j] != S[i-1][j]:
            ds.unite((i,j), (i-1, j))
        if j + 1 < W and S[i][j] != S[i][j+1]:
            ds.unite((i,j), (i, j+1))
        if 0 <= j - 1 and S[i][j] != S[i][j-1]:
            ds.unite((i,j), (i, j-1))

from collections import defaultdict

c1 = defaultdict(int)
c2 = defaultdict(int)

for i in range(H):
    for j in range(W):
        if S[i][j] == '.':
            c1[ds.findSet((i,j))] += 1
        else:
            c2[ds.findSet((i,j))] += 1
ans = 0
for i in c1.keys():
    ans += c1[i] * c2[i]
print(ans)
### BUGGY CODE ###

H = int(input())
n = 0
monsters = [H]
while len(monsters) > 0:
    n += 1
    HH = monsters[0] // 2
    if HH > 0:
        monsters.extend([HH, HH])
    del monsters[0]

print(n)


### FIXED CODE ###

H = int(input())
import math
s = 0
a = 2
for i in range(int(math.log2(H))):
    s += a
    a *= 2

print(s + 1)
### BUGGY CODE ###

n=int(input())
a={}

for i in range(n):
    s=input()
    if not a.get(s):
        a[s]=1
    else:
        v=a[s]
        v+=1
        a[s]=v
ans=[]
for i in a.items():
    if i[1]==max(a.values()):
        ans.append(i[0])

ans=sorted(ans)
for i in ans:
    print(i) 


### FIXED CODE ###

import collections 

n=int(input())
a=[]
for i in range(n):
    s=input()
    a.append(s)

b=collections.Counter(a) 
mx=max(b.values())
ans=[]

for word,counts in b.items():
    if counts==mx:
        ans.append(word)
        
ans=sorted(ans)
for i in ans:
    print(i)
### BUGGY CODE ###

N = int(input())
L = input().split()
L = [int(L[i]) for i in range(len(L))]
L.sort(reverse=True)
tri = 0
for i in range(N):
  for j in range(i+1,N):
    for k in range(j+1,N):
      if L[k] + L[j] > L[i]:
        tri += 1
print(tri)

### FIXED CODE ###

N = int(input())
L = list(map(int,input().split()))
L.sort()
cnt = 0

import bisect
for i in range(N):
  for j in range(i+1,N-1):
    insert = bisect.bisect_left(L,L[i]+L[j]) -j -1
    cnt += insert
        
print(cnt)
### BUGGY CODE ###

MOD = 10**9 + 7
MAX = 5*10**6 + 1

fact = [0 for _ in range(MAX)]
factinv = [0 for _ in range(MAX)]

fact[0] = 1
for k in range(1, MAX):
    fact[k] = fact[k - 1]*k
    fact[k] %= MOD

factinv[MAX - 1] = pow(fact[MAX - 1], MOD - 2, MOD)
for k in range(MAX - 1, 0, -1):
    factinv[k - 1] = fact[k]*k
    factinv[k - 1] %= MOD

def nCk(n, k):
    return fact[n]*factinv[k]*factinv[n - k] % MOD

def nPk(n, k):
    return fact[n]*factinv[n - k] % MOD

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

ans = 0
for k in range(n + 1):
    tmp = nCk(n, k)*nPk(m, k)*nPk(m - k, n - k)*nPk(m - k, n - k) % MOD
    if k % 2: ans += tmp
    else: ans -= tmp
    ans %= MOD

print(ans)

### FIXED CODE ###

MOD = 10**9 + 7
MAX = 5*10**5 + 1

fact = [0 for _ in range(MAX)]
factinv = [0 for _ in range(MAX)]

fact[0] = 1
for k in range(1, MAX):
    fact[k] = fact[k - 1]*k
    fact[k] %= MOD

factinv[MAX - 1] = pow(fact[MAX - 1], MOD - 2, MOD)
for k in range(MAX - 1, 0, -1):
    factinv[k - 1] = factinv[k]*k
    factinv[k - 1] %= MOD

def nCk(n, k):
    return fact[n]*factinv[k]*factinv[n - k] % MOD

def nPk(n, k):
    return fact[n]*factinv[n - k] % MOD

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

ans = 0
for k in range(n + 1):
    tmp = nCk(n, k)*nPk(m, k)*nPk(m - k, n - k)*nPk(m - k, n - k) % MOD
    if not k % 2: ans += tmp
    else: ans -= tmp
    ans %= MOD

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

from math import gcd
N = int(input())
A = list(map(int,input().split()))
MOD = 10**9+7

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

l = 1
for a in A:
  l = lcm(l, a)

# print(l)

ans = 0
for a in A:
  ans += l//a
  ans %= MOD

print(ans)

### FIXED CODE ###

from fractions import gcd
N = int(input())
A = list(map(int,input().split()))
MOD = 10**9+7
 
def lcm(a,b):
  g = gcd(a, b)
  return a*b // g
 
l = 1
for a in A:
  l = lcm(l, a)
 
# print(l)
 
ans = 0
for a in A:
  ans += l//a
  # ans %= MOD
 
print(ans%MOD)
### BUGGY CODE ###

N,T  = map(int,input().split())
if T % N == 0:
    print (int(T / N))


else:
    d = int(T / N)
    for i in range(d+1,0,-1):    
        if T % i ==0:
            print(i)
            break
   

### FIXED CODE ###

N,T  = list(map(int,input().split()))
d = int(T / N)
def ans():
    for i in range(d+1,0,-1):    
            if T % i ==0:
                print(i)
                break
if T % N == 0:
    print (d)
else:
    ans()
### BUGGY CODE ###

from itertools import combinations
def nCr(n, r):
    mod=10**9+7
    r = min(r, n-r)
    numer = denom = 1
    for i in range(1, r+1):
        numer = numer * (n+1-i) % mod
        denom = denom * i % mod
    return numer * pow(denom, mod-2, mod) % mod

nn,k=map(int,input().split())
*A,=sorted(map(int,input().split()))
B=sorted(A,reverse=True)
mod=10**9+7


mi,ma=0,0
for i in range(k-1,nn):
    L=nCr(i,k-1)    
    ma+=L*A[i]
    mi+=L*B[i]
    
print((ma-mi)%mod)

### FIXED CODE ###

M,K = map(int,input().split())
L = list(map(int,input().split()))
L.sort()
ANS = 0
 
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod
 
mod = 10**9+7 #出力の制限
N = 10**5
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル
 
for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )
 
for j in range(M-K+1):
    ANS += (L[K-1+j] - L[M-K-j])*cmb(K-1+j,K-1,mod)
 
print(ANS % mod)
### BUGGY CODE ###

from collections import defaultdict, deque

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

tree = defaultdict(lambda: [])
for _ in range(n - 1):
    a, b = map(int, input().split())
    tree[a].append(b)
    tree[b].append(a)

count = defaultdict(lambda: 0)
for _ in range(q):
    p, x = map(int, input().split())
    count[p] += x

ret = [0] * n
q = deque(maxlen=n)
q.append((1, 1))
while len(q) > 0:
    f, c = q.popleft()
    ret[c - 1] = count[c] + ret[f - 1]
    for n in tree[c]:
        if n != f:
            q.append((c, n))

print(*ret)


### FIXED CODE ###

from collections import defaultdict, deque

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

tree = [[] for _ in range(n)]
for _ in range(n - 1):
    a, b = map(int, input().split())
    tree[a - 1].append(b - 1)
    tree[b - 1].append(a - 1)

count = [0] * n
for _ in range(q):
    p, x = map(int, input().split())
    count[p - 1] += x

ret = [0] * n
q = deque(maxlen = n)
q.append((0, 0))
while len(q) > 0:
    f, c = q.popleft()
    ret[c] = count[c] + ret[f]
    for n in tree[c]:
        if n != f:
            q.append((c, n))

print(*ret)
### BUGGY CODE ###

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

from math import gcd

tmp1 = a[0]
for i in range(1, n):
    tmp1 = gcd(tmp1, a[i])

tmp2 = a[0]
flg2 = True
for i in range(1, n):
    if gcd(tmp2, a[i]) != 1:
        flg2 = False
        break
    tmp2 *= a[i]

if flg2:
    print('pairwise coprime')
elif tmp1 == 1:
    print('setwise coprime')
else:
    print('not coprime')

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
import sys
input = sys.stdin.readline

#iを篩にかけた数をmemo
def sieve_table(n):
    table = [0] * (n+1)
    for i in range(2, n+1):
        if table[i] > 0:
            continue

        table[i] = i
        for j in range(2 * i, n+1, i):
            table[j] = i
    return table

#tableから素因数分解
def factorization_from_table(x, table):
    res = set()
    while x > 1:
        res.add(table[x])
        x //= table[x]
    
    return res

table = sieve_table(10 ** 6)
set_primes = set()

flg = True
for i in range(n):
    res = factorization_from_table(a[i], table)
    if len(set_primes & res) > 0:
        flg = False
        break
    
    for x in res:
        set_primes.add(x)
        
if flg:
    print('pairwise coprime')
else:
    from math import gcd
    tmp = a[0]
    for i in range(1, n):
        tmp = gcd(tmp, a[i])
    
    if tmp == 1:
        print('setwise coprime')
    else:
        print('not coprime')
### BUGGY CODE ###

x = int(input())

a = int(pow(x, 1/5))

while True:
    if pow(a,5)-x<0:
      b = -int(pow(-(a**5-x), 1/5))
    else:
      b = int(pow((a**5-x), 1/5))
      
    if pow(a,5)-pow(b,5)==x:
      break
    a += 1

print(a, b)

### FIXED CODE ###

x = int(input())
found = False
a = 0
b = 0

for i in range(-200, 201):
  for j in range(-200, 201):
    if i**5-j**5==x:
      found = True
      a = i
      b = j
  if found:
    break
    
print(a, b)
### BUGGY CODE ###

# F

N = int(input())

list_plus = []
list_minus = []
for i in range(N):
    S = input()
    state = 0
    min_state = 0
    for s in S:
        if s == '(':
            state += 1
        else:
            state -= 1
        min_state = min(min_state, state)
    
    if state > 0:
        list_plus.append([min_state, state])
    else:
        
        list_minus.append([min_state - state, -state])

def compute(arr):
    total_state = 0

    for min_state, state in arr[-1::-1]:
        if total_state + min_state < 0:
            print('No')
            exit()
        total_state += state
    return total_state

list_plus.sort()
total_state_plus = compute(list_plus)
list_minus.sort()
total_state_minus = compute(list_minus)

print('Yes' if total_state_plus == total_state_minus else 'No')

### FIXED CODE ###

# F

N = int(input())

list_plus = []
list_minus = []
for i in range(N):
    S = input()
    state = 0
    min_state = 0
    for s in S:
        if s == '(':
            state += 1
        else:
            state -= 1
        min_state = min(min_state, state)
    
    if state > 0:
        list_plus.append((min_state, state))
    else:
        list_minus.append((min_state - state, -state))

def compute(arr):
    total_state = 0
    for min_state, state in arr[::-1]:
        if total_state + min_state < 0:
            print('No')
            exit()
        total_state += state
    return total_state

list_plus.sort()
total_state_plus = compute(list_plus)
list_minus.sort()
total_state_minus = compute(list_minus)

print('Yes' if total_state_plus == total_state_minus else 'No')
### BUGGY CODE ###

from math import factorial
n,a,b=map(int,input().split())
ans=1
for i in range(n):
  ans*=2%1000000007
ans-=(factorial(n)//(factorial(a)*factorial(n-a)))%1000000007
ans-=(factorial(n)//(factorial(b)*factorial(n-b)))%1000000007
print(max(ans-1,0))

### FIXED CODE ###

N, A, B = map(int, input().split())
P = 10**9+7

def C(n, k):
    a = 1
    b = 1
    for i in range(k):
        a = a * (n-i) % P
        b = b * (i+1) % P
    return a * pow(b, P-2, P) % P

print((pow(2, N, P) - 1 - C(N, A) - C(N, B)) % P)
### BUGGY CODE ###

def cont(ob,j):
    if (ob <= 0):
            return 0
    for i in range(len(j)):
        ob -= j[i]
        if (ob <= 0):
            return i+1
    return 9999

d,ob = map(int,input().split())
lst = []
point = []
kai = [[0 for i in range(ob//100)] for j in range(d)]

for i in range(d):
    lst =[]
    a = list(map(int,input().split()))
    for j in range(a[0]):
        lst.append((i+1)*100)
    lst[j] += a[1]
    point.append(lst)


for i in range(len(kai)):
    for j in range(len(kai[0])):
        if i == 0:
            kai[i][j] = cont((j+1)*100,point[i])
        else:
            if(sum(point[i])<(j+1)*100):
                a = kai[i-1][j]
                b = len(point[i]) + kai[i-1][j-sum(point[i])//100 ]
                if a>b:
                    kai[i][j] = b
                else:
                    kai[i][j] = a
            else:
                a = kai[i-1][j]
                b = cont((j+1)*100,point[i])
                if a>b:
                    kai[i][j] = b
                else:
                    kai[i][j] = a
        #print(kai)

#print(point)
print(kai[len(kai)-1][len(kai[0])-1])




### FIXED CODE ###

def cont(ob,j):
    if (ob <= 0):
            return 0
    for i in range(len(j)):
        ob -= j[i]
        if (ob <= 0):
            return i+1
    return 9999
 
d,ob = map(int,input().split())
lst = []
point = []
kai = [[0 for i in range(ob//100)] for j in range(d)]
 
for i in range(d):
    lst =[]
    a = list(map(int,input().split()))
    for j in range(a[0]):
        lst.append((i+1)*100)
    lst[j] += a[1]
    point.append(lst)
 
 
for i in range(len(kai)):
    for j in range(len(kai[0])):
        if i == 0:
            kai[i][j] = cont((j+1)*100,point[i])
        else:
            if(sum(point[i])<(j+1)*100):
                a = kai[i-1][j]
                b = len(point[i]) + kai[i-1][j-sum(point[i])//100 ]
                if a>b:
                    kai[i][j] = b
                else:
                    kai[i][j] = a
            else:
                a = kai[i-1][j]
                b = cont((j+1)*100,point[i])
                if a>b:
                    kai[i][j] = b
                else:
                    kai[i][j] = a
        #print(kai)
 
#print(point)
print(kai[len(kai)-1][len(kai[0])-1])
### BUGGY CODE ###

x = int(input())
n, y = 100, 0
while n < x:
    n = n % 1.01
    y = y + 1
print(n)
print(y)

### FIXED CODE ###

x = int(input())
deposit, year = 100, 0
while deposit < x:
    deposit = deposit * 101 // 100
    year += 1
print(year)
### BUGGY CODE ###

import sys
sys.setrecursionlimit(10000000)
n, m = map(int, sys.stdin.readline().split())
A = [int(sys.stdin.readline()) for _ in range(m)]

cnt=0
def calc(d):
    if d >=n:
        if d ==n:
            global cnt
            cnt+=1
        return
    if d in A:
        return
    else:
        calc(d+1)
        calc(d+2)



calc(0)
print(cnt%1000000007)

### FIXED CODE ###

import sys

n, m = map(int, sys.stdin.readline().split())
A = [int(sys.stdin.readline()) for _ in range(m)]
bloken = [0 for i in range(n+1)]
for a in A:
    bloken[a]=1
    

dp = [0 for i in range(n+1)]
dp[0] =1
#print(dp)

for i in range(1, n+1):
    if bloken[i]==1:
        continue
    if i-2>=0:
        dp[i] = dp[i-1] + dp[i-2]
    else:
        dp[i] = dp[i-1]


print(dp[-1]%1000000007)
### BUGGY CODE ###

K, S = [int(i) for i in input().split()]
cnt = 0 
x_flg = bool()
out = int()
for x in range(0,K+1):
  for y in range(0,K+1):
    z = S - (x + y)
    if K >= x and K >= y and K >= z and z >= 0:
      cnt += 1
    elif z < 0:
      break
print(cnt)

### FIXED CODE ###

K, S = [int(i) for i in input().split()]
cnt = 0 
for x in range(0,K+1):
  if 0 <= S - x <= K:
    cnt += S - x + 1
  elif 0 <= S - x <= 2*K:
    cnt += 2*K - S + x + 1
print(cnt)