Harryxun/stf_run huggingface dataset:
import math
n, h = map(int, input().split())
max_swing = 0
throw = []
for _ in range(n):
    a, b = map(int, input().split())
    max_swing = max(max_swing, a)
    throw.append(b)

throw.sort(reverse=true)

min_cnt = int(math.ceil(h / max_swing))
throw_cnt = 0
for t in throw:
    h -= t
    throw_cnt += 1
    if h <= 0:
        min_cnt = min(throw_cnt, min_cnt)
        break
    cnt = throw_cnt + int(math.ceil(h / max_swing))
    min_cnt = min(cnt, min_cnt)

print(min_cnt)


### FIXED CODE ###

import math
n, h = map(int, input().split())
max_swing = 0
throw = []
for _ in range(n):
    a, b = map(int, input().split())
    max_swing = max(max_swing, a)
    throw.append(b)

throw.sort(reverse=True)

min_cnt = int(math.ceil(h / max_swing))
throw_cnt = 0
for t in throw:
    h -= t
    throw_cnt += 1
    if h <= 0:
        min_cnt = min(throw_cnt, min_cnt)
        break
    cnt = throw_cnt + int(math.ceil(h / max_swing))
    min_cnt = min(cnt, min_cnt)

print(min_cnt)
import math
a,b = input().split()
a,b = int(a), int(b)
gcd = int(math.gcd(a,b))
glm = a * b /gcd
print(round(glm))

### FIXED CODE ###

a,b = input().split()
a,b = int(a), int(b)
x = max(a,b)
y = min(a,b)
t = 0
if x % y == 0:
    t = y
else:
    while x % y != 0:
        z = x%y
        x = y
        y = z
    t = z

glm = a * b /t
print(round(glm))
n = int(input())
a = list(map(int,input().split()))

flg = int(a[1]>a[0])
skp = 1
cnt = 1
temp = a[0]
for i in range(1,n):
    dif = a[i] - temp
    direct = int(dif>0)
    if dif != 0:
        if skp:
            flg = direct
            skp = 0
            
        elif direct != flg and skp==0:
            flg = direct
            cnt+=1
            skp = 1
    temp = a[i]
print(cnt)

### FIXED CODE ###

import numpy as np

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

cnt = 1
direct = 0
temp = a[0]
for i in range(1,n):
    dif = a[i] - temp
    if dif != 0:
        if direct == 0:
            direct = np.sign(dif)
            
        elif np.sign(a[i] - temp) != direct:
            cnt+=1
            direct = 0
    temp = a[i]
print(cnt)
N = int(input())
a = list(map(int, input().split()))
a_ = [n - (i+1) for i, n in enumerate(a) ]

b = sum(a_) // N
b_ = b + 1
s = [abs(n - b) for i, n in enumerate(a_)]
s_ = [abs(n - b_) for i, n in enumerate(a_)]

print(min(sum(s), sum(s_))

### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
a_ = sorted([n - (i+1) for i, n in enumerate(a) ])

if N//2 == 0:
    b = a_[N//2]
else:
    b = a_[(N-1)//2]

s = [abs(n - b) for i, n in enumerate(a_)]

print(sum(s))
from math import *

cnt = [[0] * 19 for i in range(19)]

ans = 0
for _ in range(int(input())):
    t = float(input())
    b = int(t * 1000000000.0)
    x, y = 0, 0
    while b % 2 == 0 and x <= 18:
        x += 1
        b //= 2
    while b % 5 == 0 and y <= 18:
        y += 1
        b //= 5
    #print(x, y)
    for i in range(19):
        for j in range(19):
            if i + x >= 18 and j + y >= 18:
                ans += cnt[i][j]
    cnt[x][y] += 1
print(ans)


### FIXED CODE ###

from math import *
#import sys 
#cin = sys.stdin()

cnt = [[0] * 20 for i in range(20)]

ans = 0
for _ in range(int(input())):
    t = input().strip().split('.')
    if (len(t) > 1):
        b = int(t[0])*1000000000 + int(t[1]) * 10 ** (9 - len(t[1]))
    else:
        b = int(t[0]) * 1000000000
    x, y = 0, 0
    while (b % 2 == 0) and (x <= 18):
        x += 1
        b //= 2
    while (b % 5 == 0) and (y <= 18):
        y += 1
        b //= 5
    #print(x, y)
    for i in range(20):
        for j in range(20):
            if (i + x >= 18) and (j + y >= 18):
                ans += cnt[i][j]
    cnt[x][y] += 1
print(ans)
x = input()
y = x // 2
if(x % 2 != 0):
  y += 1
  
print(y)

### FIXED CODE ###

x = int(input())
if (x % 2 == 0):
  y = x // 2
else:
  y = x//2 + 1

print(y)
from collections import deque

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

l = deque(list(map(int,input().split())))
count = 0
while count <= x:
    count += l.popleft()

print(n-len(l))

### FIXED CODE ###

from collections import deque

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

l = deque(list(map(int,input().split())))
count = 0

if sum(l) <= x:
    print(n+1)
else:
    while count <= x:
        count += l.popleft()
        if len(l) == 0:
            break

    print(n-len(l))
N,K = map(int, input().split())
P = list(map(int,input().split()))

def calc_expected_val(val):
    return (1+val)/2

def main():
    expected_val = 0
    expected_val_list = []
    sum_val = 0
    sum_val_list = []
    sum_K = 0
    sum_K_list = []
    max_expected_val = 0
    for i in range(N):
        expected_val = calc_expected_val(P[i])
        expected_val_list.append(expected_val)
        sum_val += expected_val
        sum_val_list.append(sum_val)

    for j in range(N-K):
        sum_K = sum_val_list[j+K] - sum_val_list[j]
        sum_K_list.append(sum_K)

    max_expected_val = max(sum_K_list)
    print(max_expected_val)

if __name__ == "__main__":
    main()
    

### FIXED CODE ###

N, K = map(int, input().split())
p = list(map(int,input().split()))
ans = 0
cum = [0]
     
for i in range(len(p)):
    ex = (1 + p[i])/2
    p[i] = ex
        
for i in  range(len(p)):
    cum.append(p[i] + cum[i])
        
for i in range(K, N+1):
    ans  = max(ans, cum[i] - cum[i-K])
     
print(ans)
N, M = map(int, input().split())
P = [input().split() for i in range(M)]
print(type(P), P)

### FIXED CODE ###

import math
L, M = map(int,input().split())
list1=[]
for i in range(L):
  X,Y = map(int,input().split())
  r = X**2+Y**2
  if r <= M**2:
    list1.append(r)
print(len(list1))
S=list(input())
l=sorted(list(set(S)))
for i in range(97,97+26):
    if chr(i) !=l.pop(0):
        print(chr(i))
        break
    elif chr(i) == 'z':
        print('None')


### FIXED CODE ###

S=list(input())
l=sorted(list(set(S)))
for (i,j) in zip(range(len(l)),range(97,97+26)):
    if chr(j) !=l[i]:
        print(chr(j))
        exit()
    elif chr(j) == 'z':
        print('None')
        exit()
print(chr(j+1))
s = input()
ans = 0
if s=1:
    ans += "1"
print(ans)

### FIXED CODE ###

s = input()
print(s.count("1"))
i1 = input().split(' ')
a=int(i1[0])+int(i1[1])
b=int(i1[2])+int(i1[3])

if a>b:
  print("Left")
elif a=b:
  print("Balanced")
else:
  print("Right")

### FIXED CODE ###

i1 = input().split(' ')
a=int(i1[0])+int(i1[1])
b=int(i1[2])+int(i1[3])

if a>b:
  print("Left")
elif a==b:
  print("Balanced")
else:
  print("Right")
N = int(input())
A = [int(a)-i-1 for i,a in enumerate(input().split(),1)]
A.sort()
b = int(sum(a)/len(a))
c = 10**9
for j in range(b-10, b+11):
    k = sum(map(lambda x:abs(x-j), A))
    c = min(c,k)
print(c)

### FIXED CODE ###

import statistics
N = int(input())
A = [int(a)-i-1 for i,a in enumerate(input().split(),1)]
b = statistics.median_low(A)
c = statistics.median_high(A)
d = sum(map(lambda x:abs(x-b),A))
e = sum(map(lambda x:abs(x-c),A))
print(min(d,e))
def binaryinsertion(A,x):
    left=0;right=len(A)-1
    while(True):
        centre = left + (right-left)//2 - 1
        if(right - left < 2):
            if(x[0]<A[left][0]):A.insert(left,x)
            else :
                if(x[0]<A[right][0]):A.insert(right,x)
                else:A.insert(right+1,x)
            break
        else:
            if(x[0] < A[centre][0]) :
                right = centre - 1
            elif(A[centre][0] < x[0]) :
                left = centre + 1
            else : 
                A.insert(centre,x)
                break

[N,L] = [int(x) for x in input().split()]
A = [[int(x),int(i)] for i,x in enumerate(input().split())]
sweep = A[:L]
sweep = sorted(sweep)
ans = [str(sweep[0][0])]
for i in range(L,N) :
    sweep.remove(A[i-L])
    binaryinsertion(sweep,A[i])
    ans.append(str(sweep[0][0]))
print(" ".join(ans))

### FIXED CODE ###

def ascend(a,b):
    mini = min(A[a:a+L])
    ans[a] = mini
    for i in range(a+1,b):
        if A[i+L-1] <= mini : mini = A[i+L-1]
        elif A[i-1] == mini : mini = min(A[i:i+L])
        ans[i] = mini

def descend(a,b):
    mini = min(A[b-1:b+L-1])
    ans[b-1] = mini
    for i in range(b-2,a-1,-1):
        if A[i] <= mini : mini = A[i]
        elif A[i+L] == mini: mini = min(A[i:i+L])
        ans[i] = mini
    
[N,L] = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
ans = [None]*(N-L+1)
count = 0;
if N > 10 ** 4:
    for i in range(100):
        if A[i+1] > A[i] : count += 1
    if count > 80 : descend(0, N-L+1)
    else : ascend(0,N-L+1)
else :
    ascend(0, N-L+1)
for i in ans[:-1] : print(i, end=" ")
print(ans[-1])
S = input()
N = len(S)
ans = []
check = []
for i in range(N):
    if S[i] != 'x':
        ans.append(S[i])
        check.append(i)
if ans != ans[::-1]:
    print(-1)
    exit()
if len(ans)%2:
    cl,cr = check[len(ans)//2],check[len(ans)//2]
else:
    cl,cr = check[len(ans)//2-1],check[len(ans)//2]
cnt = 0
while 0 <= cl and cr <= N-1:
    if S[cl] == S[cr]:
        cl -= 1
        cr += 1
    elif S[cl] == 'x':
        cnt += 1
        cl -= 1
    else:
        cnt += 1
        cr += 1
cnt += max(cl+1,N-cr)
print(cnt)


### FIXED CODE ###

S = input()
N = len(S)
ans = []
check = []
for i in range(N):
    if S[i] != 'x':
        ans.append(S[i])
        check.append(i)
if len(ans) == 0:
    print(0)
    exit()
if ans != ans[::-1]:
    print(-1)
    exit()
if len(ans)%2:
    cl,cr = check[len(ans)//2],check[len(ans)//2]
else:
    cl,cr = check[len(ans)//2-1],check[len(ans)//2]
cnt = 0
while 0 <= cl and cr <= N-1:
    if S[cl] == S[cr]:
        cl -= 1
        cr += 1
    elif S[cl] == 'x':
        cnt += 1
        cl -= 1
    else:
        cnt += 1
        cr += 1
cnt += max(cl+1,N-cr)
print(cnt)
n = int(input())
g = input().split()
a = [int(i) for i in g]
b = list()
for i in reversed(g):
  b.append(int(i))
x = list()
y = list()
z = list()
p = 0
q = 0
r = 0
s = 0
c = n-1
for i in range(n):
  for i in a:
    x.append(i)
    r += 1
    if r == c:
      break
    p = sum(a)-p
  for i in b:
    y.append(i)
    s += 1
    if s == n-c:
      break
  c -= 1
  z.append(p-q)
print(min(z))
  

### FIXED CODE ###

a = input().split()
p = int(a[0])
q = int(a[1])
r = int(a[2])
x = p + q
y = q + r
z = p + r
print(min([x,y,z]))
N = int(input())
an = list(map(int, input().split()))
over_cnt = 0
colors = []
for a in an:
    rate = a // 400
    if rate >= 8:
        over_cnt += 1
    elif rate not in colors:
        colors.append(rate)

min = len(colors)
max = min(len(colors) + over_cnt, 8)
print(min, max)


### FIXED CODE ###

N = int(input())
an = list(map(int, input().split()))
over_cnt = 0
colors = []
for a in an:
    rate = a // 400
    if rate >= 8:
        over_cnt += 1
    elif rate not in colors:
        colors.append(rate)

print(max(len(colors), 1), len(colors) + over_cnt)
import sys
input = sys.stdin.readline
N = int(input())
node = [0 for i in range(N)]
neigh = [[] for j in range(N)]
ans = [0 for i in range(N)]
visited = [0 for i in range(N)]
k = 1

for i in range(N-1):
    ai,bi = map(int,input().split())
    node[ai-1] += 1
    node[bi-1] += 1
    neigh[ai-1].append(bi-1)
    neigh[bi-1].append(ai-1)
c = list(map(int,input().split()))
c.sort(reverse=True)
def dfs(neighbor,start,visited):
    global k
    global c
    if sum(visited) == N:
        return 0
    for i in neighbor[start]:
        if visited[i] == 0:
            ans[i] = c[k]
            k += 1
            visited[i] = 1
            dfs(neighbor,i,visited)
        else:
            continue
    return 0
m = max(node)
nn = node.index(m)
visited[nn] = 1
ans[nn] = max(c)

dfs(neigh,nn,visited)
ans2 = ' '.join([str(ans[i]) for i in range(N)])
print(sum(c)-max(c))
print(ans2)


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
N = int(input())


node = [0 for i in range(N)]
neigh = [[] for j in range(N)]
ans = [0 for i in range(N)]
visited = [0 for i in range(N)]
k = 1

for i in range(N-1):
    ai,bi = map(int,input().split())
    node[ai-1] += 1
    node[bi-1] += 1
    neigh[ai-1].append(bi-1)
    neigh[bi-1].append(ai-1)
c = list(map(int,input().split()))
c.sort(reverse=True)
flag = False
def dfs(neighbor,start):
    global flag
    global k
    if sum(visited) == N:
        return 0

    for i in neighbor[start]:
        
        if visited[i] == 0:
            ans[i] = c[k]
            k += 1
            visited[i] = 1
            try:
                dfs(neighbor,i)
            except RuntimeError:
                flag = True
                return 0




m = max(node)
nn = node.index(m)
#nn = [node[i] for i in range(N) if node[i] == m][0]
visited[nn] = 1
ans[nn] = max(c)

dfs(neigh,nn)
"""
if flag:
    print(100)
    print(' '.join([str(i) for i in range(N)]))
    exit()
"""
ans2 = ' '.join([str(ans[i]) for i in range(N)])


print(sum(c)-max(c))
print(ans2)
import sys
def input(): return sys.stdin.readline().rstrip()
from collections import Counter
def main():
    h,w=map(int,input().split())
    s=""
    for _ in range(h):
        s+=input()
    sc=list(Counter(s).values())
    #print(sc)
    if h%2==1 and w%2==1:
        for i,scc in enumerate(sc):
            if scc%2==1:
                sc[i]-=1
                break
        else:
            print("No")
            sys.exit()
    #print(sc)
    cunt_2=0
    if h%2==1:cunt_2+=w//2
    if w%2==1:cunt_2+=h//2
    for i,scc in enumerate(sc):
        if cunt_2==0:break
        if scc%4==2:
            sc[i]-=2
            cunt_2-=1
    else:
        if cunt_2%2==1:
            print("No")
            sys.exit()
        else:
            for i,scc in enumerate(sc):
                if cunt_2==0:break
                if scc>0 and scc%4==0:
                    sc[i]-=4
                    cunt_4-=2  
            else:
                print("No")
                sys.exit()
    #print(sc)
    cunt_4=(h//2)*(w//2)
    for i,scc in enumerate(sc):
        if cunt_4>0 and scc>0 and scc%4==0:
            sc[i]-=4
            cunt_4-=1
    #print(sc)
    print("Yes" if all(scc==0 for scc in sc) else "No")

        

if __name__=='__main__':
    main()

### FIXED CODE ###

import sys
def input(): return sys.stdin.readline().rstrip()
from collections import Counter
def main():
    h,w=map(int,input().split())
    s=""
    for _ in range(h):
        s+=input()
    sc=list(Counter(s).values())
    cunt_1=(h%2)*(w%2)
    cunt_2=(h%2)*(w//2)+(w%2)*(h//2)
    cunt_4=(h//2)*(w//2)
    #print(sc)
    for i,scc in enumerate(sc):
        if scc>=4:
            x=min(scc//4,cunt_4)
            sc[i]-=x*4
            cunt_4-=x
    for i,scc in enumerate(sc):
        if scc>=2:
            x=min(scc//2,cunt_2)
            sc[i]-=x*2
            cunt_2-=x
    for i,scc in enumerate(sc):
        if scc>=1:
            x=min(scc,cunt_1)
            sc[i]-=x
            cunt_1-=x
    print("Yes" if all(scc==0 for scc in sc) else "No")

        

if __name__=='__main__':
    main()
def resolve():
    N,K=map(int,input().split())
    a=list(map(int,input().split()))

    A=[0]*2000
    B=[0]*2000
    mina=min(a)
    for i in reversed(range(len(a))):
        if a[i]==mina:continue
        for j in range(i+1,N):
            if a[j]<a[i]:
                A[a[i]]+=1
    for i in reversed(range(len(a))):
        if a[i]==mina:continue
        for j in range(N):
            if a[j]<a[i]:
                B[a[i]]+=1
    sumA=sum(A)
    sumB=sum(B)
    ans=int((0.5*(2*sumA+(K-1)*sumB)*K)%(10**9+7))
    print('{}'.format(ans))

resolve()

### FIXED CODE ###

def resolve():
    N,K=map(int,input().split())
    a=list(map(int,input().split()))

    A=0
    B=0
    mina=min(a)
    for i in reversed(range(len(a))):
        if a[i]==mina:continue
        for j in range(i,len(a)):
            if a[j]<a[i]:
                A+=1
    for i in reversed(range(len(a))):
        if a[i]==mina:continue
        for j in range(len(a)):
            if a[j]<a[i]:
                B+=1
    ans=int(((2*A+(K-1)*B)*K//2)%(10**9+7))
    print('{}'.format(ans))

resolve()
N,K,Q=map(int,input().split())
L=[K-Q]*N
for j in range(Q):
  A=int(input())
  L[A]+=1
for i in L:
  if i>0:
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

N,K,Q=map(int,input().split()) #Nは人の人数、Kはみなが最初に持っているポイント、Qはクイズの回数
L=[K-Q]*N #
for i in range(Q):
    m=int(input())-1
    L[m]+=1
for k in range(N):
    if L[k]>0:
        print("Yes")
    else:
        print("No")
#!/usr/bin/env python3

from functools import lru_cache

a = {-1}


@lru_cache(maxsize=None)
def solv(n):
    if n == 0:
        return 1
    count = 0
    if (n-2) not in a:
        count += solv(n-2)
    if (n-1) not in a:
        count += solv(n-1)
    return count


if __name__ == '__main__':

    n, m = map(int, input().split())
    for _ in range(m):
        a.add(int(input()))

    ans = solv(n)

    print(ans % 1000000007)


### FIXED CODE ###

#!/usr/bin/env python3

import math
from functools import lru_cache


def ncr(n, r):
    r = min(r, n - r)
    # 桁が小さいときは直接 math.factorial を使ったほうが早い
    if n + r < 4000:
        return math.factorial(n) // math.factorial(n-r) // math.factorial(r)
    if r == 0:
        return 1
    if r == 1:
        return n
    numerator = list(range(n - r + 1, n + 1))
    denominator = list(range(1, r+1))
    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] //= pivot
                denominator[k] //= pivot
    result = 1
    for k in range(r):
        result *= numerator[k]
    return result


# 穴なしで n step 離れている場合の組み合わせ
def no_hole(n):
    count = 0
    m = n // 2
    for i in range(0, m+1):
        count += ncr(n-i, i)
    return count


# 穴なしで n step 離れている場合の組み合わせ(高速化版)
@lru_cache(maxsize=8192)
def no_hole2(n):
    if n <= 5:
        return (1, 1, 2, 3, 5, 8)[n]
    if n % 2:
        h = (n-1) // 2
        m1 = no_hole2(h-1)
        m0 = no_hole2(h)
        return 2 * m1 * m0 + m0 * m0
    else:
        h = n // 2
        m2 = no_hole2(h-2)
        m1 = no_hole2(h-1)
        m0 = no_hole2(h)
        return m1 * m1 + m2 * m0 + m1 * m0


def solv(n, m, a):
    ans = 1
    current_pos = 0
    for pos in a:
        dist = pos - 1 - current_pos
        if dist < 0:
            return 0
        ans *= no_hole2(dist)
        current_pos = pos + 1
    dist = n - current_pos
    ans *= no_hole2(dist)
    return ans


if __name__ == '__main__':

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

    ans = solv(n, m, a)

    P_NUM = 1000000007
    print(ans % P_NUM)
// Last Change: 08/18/2019 21:25:06.
#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;
using ll = long long;

int main() {
  ll N;
  cin >> N;
  vector<double> v(N);
  for (auto &&e : v) {
    cin >> e;
  }
  sort(v.begin(), v.end());
  double ans = v[0];
  for (ll i = 1; i < N; ++i) {
    ans = (ans + v[i]) / 2;
  }
  cout << ans << endl;
}



### FIXED CODE ###

N=int(input())
v = list(map(float,input().split(' ')))
v.sort()

ans = v[0]
for i in range(N-1):
   ans = (ans+v[i+1])/2

print(ans)
n, m = map(int, input().split())

p = list(range(n))


def find(x):
    if p[x] != x:
        p[x] = find(p[x])
    return p[x]


def union(x, y):
    x, y = find(x), find(y)
    p[y] = x


for i in range(m):
    x, y, z = [int(i) - 1 for i in input().split()]
    if find(x) != find(y):
        union(x, y)

ans = set()
for i in range(n):
    find(i)
print(len(set(p)))


### FIXED CODE ###

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

p = list(range(n))


def find(x):
    if p[x] != x:
        p[x] = find(p[x])
    return p[x]


def union(x, y):
    x, y = find(x), find(y)
    p[x] = p[y] = min(x, y)


for _ in range(m):
    x, y, z = [int(i) - 1 for i in input().split()]
    if find(x) != find(y):
        union(x, y)

ans = set()
for i in range(n):
    find(i)
print(len(set(p)))
#B問題
n = int(input())
# ある整数に対し、各桁の和を与える

def findSumOfDigits(n):
    sum = 0
    while n > 0:
        sum += n % 10
        n = int(n / 10)
    return sum

ans = findSumOfDigits(n) % 9 

if ans == 0:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

#B問題

#ABSの定石使うとなぜかRE

#今回はPython解説サイト参照

#①入力を文字列で受け取る→②一文字ずつ整数に変換して、forループで回しながら足し算する

N = input()
cur = 0

for i in N:
    cur += int(i)

if cur % 9 == 0:
    print("Yes")
else:
    print("No")
l=[0]*13
input()
for i in input().split():
  l[int(i)//400]+=1
r=sum([1 for a in l[:8] if a > 0])
print(max(1,r,r+sum(l[8:])

### FIXED CODE ###

al=[0]*13
input()
for i in input().split():
    al[int(i)//400]+=1
tuyoi=sum(al[8:])
iru=sum([1 for a in al[:8] if a > 0])
print(max(1,iru),iru+tuyoi)
N=int(input())
S=input()
count = 0
for i in range(1000):
    x= i%10
    z= i//100
    y= (i-x-(z*100))//10
    
    p=0
    for j in range(N):
        if S[j]!=str(z):
            p = p+1
        else:
          for k in range(p+1,N):
            if S[k]!=str(y):
                p = p+1
            else:
                for l in range(q+1,N):
                  if S[l]!=str(x):
                    p = p+1
                  else:
                    break
                
                
    if p<=N-2:
      count = count+1
    else:
      count = count
      
print(count)

### FIXED CODE ###

X=int(input())
if X//100 != X//105:
  print(1)
elif X//100 == X//105 and X%105==0:
  print(1)
else:
  print(0)
import math

from collections import Counter


N = int(input())

S = [''.join(sorted(list(input()))) for i in range(N)]

print(sum([math.factorial(i) // math.factorial(i-2) // 2 for i in Counter(S).values()]))


### FIXED CODE ###

import math

from collections import Counter


def func(i):
    if i >= 1:
        return math.factorial(i)
    else:
        return 1


N = int(input())

S = [''.join(sorted(list(input()))) for i in range(N)]

print(sum([func(i) // func(i-2) // 2 for i in Counter(S).values()]))
# -*- coding: utf-8 -*-
def is_integer(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

a,b = map(int, raw_input().split())
sub = b - a

if a >= b:
	print 1
else:
	count = 1
	while True:
		count +=1
		if sub <= a-1:			
			break
		else:
			sub = sub - (a-1)
print count

### FIXED CODE ###

# -*- coding: utf-8 -*-
a,b = map(int, raw_input().split())
tmp = a

if b == 1:
	print 0
elif a >= b:
	print 1
else:
	count = 1
	while True:
		count +=1
		tmp += (a - 1)
		if tmp >= b:
			print count
			break