Harryxun/stf_run huggingface dataset:
# coding: utf-8

import sys
import math

import array
import bisect
import collections
from collections import Counter, defaultdict
import fractions
import heapq
import re

sys.setrecursionlimit(1000000)


def array2d(dim1, dim2, init=None):
    return [[init for _ in range(dim2)] for _ in range(dim1)]

def argsort(l, reverse=False):
    return sorted(range(len(l)), key=lambda i: l[i], reverse=reverse)

def argmin(l):
    return l.index(min(l))

def YESNO(ans, yes="YES", no="NO"):
    print([no, yes][ans])

II = lambda: int(input())
MI = lambda: map(int, input().split())
MIL = lambda: list(MI())
MIS = lambda: input().split()


def prev_multi(num, multi):
    return math.floor(num / multi) * multi

def next_multi(num, multi):
    return math.ceil(num / multi) * multi


def main():
    A, B = MI()
    ans = (math.ceil(B/2) - math.floor(A/2)) % 2
    for i in range(1, math.ceil(math.log2(B)) + 1):
        p = 2**i

        na = next_multi(A, p)
        if (na > B):
            d = 0 if (na / p) % 2 else B - A + 1
        else:
            da = 0 if (na / p) % 2 else na - A
            pb = prev_multi(B, p)
            db = 0 if (pb / p) % 2 == 0 else B - pb + 1
            d = da + db
        ans += d % 2 * p

    return ans

if __name__ == "__main__":
    print(main())


### FIXED CODE ###

# coding: utf-8

import sys
import math

import array
import bisect
import collections
from collections import Counter, defaultdict
import fractions
import heapq
import re

sys.setrecursionlimit(1000000)


def array2d(dim1, dim2, init=None):
    return [[init for _ in range(dim2)] for _ in range(dim1)]

def argsort(l, reverse=False):
    return sorted(range(len(l)), key=lambda i: l[i], reverse=reverse)

def argmin(l):
    return l.index(min(l))

def YESNO(ans, yes="YES", no="NO"):
    print([no, yes][ans])

II = lambda: int(input())
MI = lambda: map(int, input().split())
MIL = lambda: list(MI())
MIS = lambda: input().split()


def prev_multi(num, multi):
    return math.floor(num / multi) * multi

def next_multi(num, multi):
    return math.ceil(num / multi) * multi


def main():
    A, B = MI()
    if B == 0: return 0
    ans = (math.ceil(B/2) - math.floor(A/2)) % 2
    for i in range(1, math.ceil(math.log2(B)) + 1):
        p = 2**i

        na = next_multi(A, p)
        if (na > B):
            d = 0 if (na / p) % 2 else B - A + 1
        else:
            da = 0 if (na / p) % 2 else na - A
            pb = prev_multi(B, p)
            db = 0 if (pb / p) % 2 == 0 else B - pb + 1
            d = da + db
        ans += d % 2 * p

    return ans

if __name__ == "__main__":
    print(main())
import sys
li = ["dream","dreamer","erase","eraser"]
li = [s[::-1] for s in li]
sen = input()[::-1]
while 1:
  if sen[:5] == "maerd":
    if len(sen) == 5:
      print("YES")
      sys.exit()
    else sen = sen[5:]
  elif sen[:6] == "remaerd":
    if len(sen) == 6:
      print("YES")
      sys.exit()
    else sen = sen[6:]
  elif sen[:5] == "esare":
    if len(sen) == 5:
      print("YES")
      sys.exit()
    else sen = sen[5:]
  elif sen[:6] == "resare":
    if len(sen) == 6:
      print("YES")
      sys.exit()
    else sen = sen[6:]
  else:
    print("NO")
    sys.exit()

### FIXED CODE ###

import sys
li = ["dream","dreamer","erase","eraser"]
li = [s[::-1] for s in li]
sen = input()[::-1]
while 1:
  ju = 0
  for i in range(4):
    le = len(li[i])
    if sen[:le] == li[i]:
      if len(sen) == le:
        print("YES")
        sys.exit()
      else:
        sen = sen[le:]
        ju = 1
  if not ju:
    print("NO")
    sys.exit()
def score(c,s,t,lis):
    ans = 0
    ans += s[t-1]
    lis[t-1] = 0
    for j in range(26):
        if t-1 != j:
            lis[j] += 1
            ans -= lis[j]*c[j] 
    return ans,lis

d = int(input())
c = list(map(int,input().split()))
s = [0]*d
for i in range(d):
    s[i] = list(map(int,input().split()))
lis = [0]*26
for i in range(d):
    ans = 0
    z = 0
    L = lis
    q = 0
    for j in range(26):
        y,p = score(c,s[i],j,L)
        if ans < y:
            ans = y
            z = j
            q = p
    print(z+1)
    lis = q


### FIXED CODE ###

import numpy
d = int(input())
c = list(map(int,input().split()))
s = [0]*d
for i in range(d):
    s[i] = list(map(int,input().split()))
for i in range(d):
    max_index = numpy.argmax(s[i])
    print(max_index+1)
import collections

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

v1 = v[::2]
v2 = v[1::2]

c1 = collections.Counter(v1)
c2 = collections.Counter(v2)

if v1 == v2 and len(c1.most_common()) == 1
    print(len(v1))
elif c1.most_common()[0][0] != c2.most_common()[0][0]:
    print(len(v1) - c1.most_common()[0][1] + len(v2) - c2.most_common()[0][1])
else:
    if c1.most_common()[1][1] < c2.most_common()[1][1]:
        print(len(v1) - c1.most_common()[0][1] + len(v2) - c2.most_common()[1][1])
    else:
        print(len(v1) - c1.most_common()[1][1] + len(v2) - c2.most_common()[0][1])

### FIXED CODE ###

import collections

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

v1 = v[::2]
v2 = v[1::2]

c1 = collections.Counter(v1)
c2 = collections.Counter(v2)

if (v1 == v2 and len(c1.most_common()) == 1):
    print(len(v1))
elif c1.most_common()[0][0] != c2.most_common()[0][0]:
    print(len(v1) - c1.most_common()[0][1] + len(v2) - c2.most_common()[0][1])
else:
    if c1.most_common()[1][1] < c2.most_common()[1][1]:
        print(len(v1) - c1.most_common()[0][1] + len(v2) - c2.most_common()[1][1])
    else:
        print(len(v1) - c1.most_common()[1][1] + len(v2) - c2.most_common()[0][1])
n, m = list(map(int, input().split()))
a = [input() for i in range(m)]
b = []
c = []
total_act = 0
total_act2 = 1
total = 1
b.append(int(a[0]))
for i in range(len(a) - 1):
    b.append(int(a[i + 1]) - int(a[i]) - 1)
for i in range(max(b)):
    total_act3 = total_act2 + total_act
    total_act2 = total_act
    total_act = total_act3
    c.append(total_act)
for i in b:
    total *= c[i - 1]

total *= c[n - int(a[-1]) - 1]
print(total % 1000000007)


### FIXED CODE ###

n, m = list(map(int, input().split()))
a = [input() for i in range(m)]
b = []
c = []
total_act = 0
total_act2 = 1
total = 1
if m == 0:
    for i in range(n + 1):
        if str(i) in a:
            total *= total_act
            total_act = 0
            total_act2 = 1
        else:
            total_act3 = total_act2 + total_act
            total_act2 = total_act
            total_act = total_act3
    total *= total_act
    print(total % 1000000007)
else:
    b.append(int(a[0]))
    for i in range(len(a) - 1):
        b.append(int(a[i + 1]) - int(a[i]) - 1)
        if int(a[i + 1]) - int(a[i]) - 1 == 0:
            print(0)
            exit()
    b.append(n - int(a[-1]))

    for i in range(max(b)):
        total_act3 = total_act2 + total_act
        total_act2 = total_act
        total_act = total_act3
        c.append(total_act)

    for i in b:
        total *= c[i - 1]
    print(total % 1000000007)
n=int(input())
h=list(map(int,input().split()))
def f(i):
  if i==n-1:
    return 0
  if i<n-1 and h[i]>=h[i+1]:
    return f(i+1)+1
  return 0
m=0
for i in range(n):
  m=max(f(i),m)
print(m)


### FIXED CODE ###

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

c = 0
a = 0   
for i in range(n-1):
  if h[i] >= h[i+1]:
    c += 1
  else:
    a = max(c, a)
    c = 0
    
a = max(c, a)    
print(a)
N,M,X,Y=list(map(int,input().split()))
x=list(map(int,input().split()))
y=list(map(int,input().split()))

a=x_max+1
b=y_min

def judge(a,b):
    if(a>b):
        return print("No War")
    else:
        z=range(a,b+1)
        for i in z:
            if(i>X and i<=Y):
                return print("No War")
        else:
            return print("War")
        
judge(a,b)

### FIXED CODE ###

N,M,X,Y=list(map(int,input().split()))
x=list(map(int,input().split()))
y=list(map(int,input().split()))

a=max(x)+1
b=min(y)

def judge(a,b):
    if(a>b):
        return print("War")
    else:
        z=range(a,b+1)
        for i in z:
            if(i>X and i<=Y):
                return print("No War")
        else:
            return print("War")
        
judge(a,b)
S,T = map(String, input().split())
print('{}{}'.format(T, S))

### FIXED CODE ###

S,T = input().split()
#print('{}{}'.format(T, S))
print(T+S)
from collections import Counter,defaultdict,deque
import sys
import bisect
import math
from itertools import permutations,combinations
import string
import queue
import copy
import numpy as np
from heapq import heappop, heappush
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): # n=1
    return int(input())
def inpm(): # x=1,y=2
    return map(int,input().split())
def inpl(): # a=[1,2,3,4,5,...,n]
    return list(map(int, input().split()))
def inpls(): # a=['1','2','3',...,'n']
    return list(input().split())
def inplm(n): # x=[] 複数行
    return list(int(input()) for _ in range(n))
def inpll(n): # [[1,1,1,1],[2,2,2,2],[3,3,3,3]]
    return sorted([list(map(int, input().split())) for _ in range(n)])
def sortx(x,n,k):
    if k == 0:x.sort(key=lambda y:y[1,n])
    else:x.sort(reversed=True, key=lambda y:y[1,n])
def graph():
    n=inp()
    g=[[] for _ in range(n)]
    for i in range(n):
        a=inp()
        a-=1
        g[i].append(a)
        g[a].append(i)
    return n,g
def graphm():
    n,m=inpm()
    g=[[] for _ in range(n)]
    for _ in range(m):
        a,b,w=inpm()
        a-=1
        b-=1
        g[a].append((b,w))
        g[b].append((a,w))
    return n,m,g

def main():#gpg
    s = input()
    NG = 1
    NP = 0
    did = ["g"]
    point = 0
    for i in range(1,len(s)):
        if s[i] == "g":
            if NP + 1 <= NG:
                did.append("p")
                NP += 1
                point += 1
            else:
                did.append("g")
                NG += 1
        else:
            if NP + 1 <= NG:
                did.append("p")
                NP += 1
            else:
                did.append("g")
                NG += 1
                point -= 1
    print(point)

if __name__ == "__main__":
    main()




### FIXED CODE ###

def inp(): # n=1
    return int(input())
def inpm(): # x=1,y=2
    return map(int,input().split())
def inpl(): # a=[1,2,3,4,5,...,n]
    return list(map(int, input().split()))
def inpls(): # a=['1','2','3',...,'n']
    return list(input().split())
def inplm(n): # x=[] 複数行
    return list(int(input()) for _ in range(n))
def inpll(n): # [[1,1,1,1],[2,2,2,2],[3,3,3,3]]
    return sorted([list(map(int, input().split())) for _ in range(n)])
def sortx(x,n,k):
    if k == 0:x.sort(key=lambda y:y[1,n])
    else:x.sort(reversed=True, key=lambda y:y[1,n])

def main():
    s = input()
    NG = 1
    NP = 0
    did = ["g"]
    point = 0
    for i in range(1,len(s)):
        if s[i] == "g":
            if NP + 1 <= NG:
                did.append("p")
                NP += 1
                point += 1
            else:
                did.append("g")
                NG += 1
        else:
            if NP + 1 <= NG:
                did.append("p")
                NP += 1
            else:
                did.append("g")
                NG += 1
                point -= 1
    print(point)

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

q = int(input())


n = 100000
primes = set(range(2, n+1))

for i in range(2, int(n**0.5+1)):
    primes.difference_update(range(i*2, n+1, i))

primes = list(primes)


def is_prime(i):
    p = bisect.bisect_left(primes, i)
    if primes[p] == i:
        return True
    else:
        return False


ans = []
for _ in range(q):
    tmp = 0
    l, r = map(int, input().split())
    tmp += sum([is_prime(x) and is_prime((x + 1) // 2) for x in range(l, r + 1, 2)])
    ans.append(tmp)

print(*ans, sep="\n")

### FIXED CODE ###

import numpy as np

q = int(input())

# 素数列挙
n = 10**5 + 1
primes = set(range(3, n+1, 2))
for i in range(3, int(n**0.5+1)):
    primes.difference_update(range(i*2, n+1, i))
primes.add(2)

arr = np.array(list(primes))
arr = np.bincount(arr)

# 素数かつ2017に似た数を列挙
like_2017 = np.zeros(n, bool)
for i in np.where(arr == 1)[0]:
    if (i + 1) // 2 in primes:
        like_2017[i] = True

like_2017 = like_2017.cumsum()


def cnt_primes(l, r):
    return like_2017[r] - like_2017[l - 1]


ans = []
for _ in range(q):
    tmp = 0
    l, r = map(int, input().split())
    tmp += cnt_primes(l, r)
    ans.append(tmp)

print(*ans, sep="\n")
N = int(input())
A = list((map(int,input().split())))
B = list((map(int,input().split())))
C = list((map(int,input().split())))
 
total = sum(B)
point = 0
for i in range(len(A) - 1):
    if A[i] + 1 == A[i+1]:
        point = point+C[A[i-1]]
        print(point)
print(total+point)

### FIXED CODE ###

N = int(input())
A = list((map(int,input().split())))
B = list((map(int,input().split())))
C = list((map(int,input().split())))
 
total = sum(B)
for i in range(len(A) - 1):
    if A[i] + 1 == A[i+1]:    	
        total= total+C[A[i]-1]
      
print(total)
n, m = map(int, input().split())
edge = [[] for i in range(n)]
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    edge[a].append(b)
    edge[b].append(a)
# -1 → 0,1に塗っていきます
color=[-1 for i in range(n)]
def dfs(pos):
    ret = True
    for i in range(len(edge[pos])):
        to = edge[pos][i]
        if color[to] == -1:
            color[to] = 1 ^ color[pos]
            ret &= dfs(to)
        else:
            ret &= not (color[to]==color[pos])
    return ret

color[0]=0
if dfs(0):
    black, white = 0, 0
    for i in range(n):
        if color[i]==0:
            black += 1
        else:
            white += 1
    print(black*white-m)
else:
    print(n*(n-1)//2-m)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**8)
n, m = map(int, input().split())
edge = [[] for i in range(n)]
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    edge[a].append(b)
    edge[b].append(a)
# -1 → 0,1に塗っていきます
color=[-1 for i in range(n)]
def dfs(pos):
    ret = True
    for i in range(len(edge[pos])):
        to = edge[pos][i]
        if color[to] == -1:
            color[to] = 1 ^ color[pos]
            ret &= dfs(to)
        else:
            ret &= not (color[to]==color[pos])
    return ret

color[0]=0
if dfs(0):
    black, white = 0, 0
    for i in range(n):
        if color[i]==0:
            black += 1
        else:
            white += 1
    print(black*white-m)
else:
    print(n*(n-1)//2-m)
import math

A,B,H,M = map(int,input().split())

H = (H*360/12)+(M*30/60)
M = M*360/60

a = abs(H-M)
# print(a)
ans = math.sqrt((A**2)+(B**2)-2*A*B*math.cos(math.radians(a)))
print(ans)

mm = (A**2+B**2-(4.56425719433**2))/(2*A*B)
# print(mm)
mm = math.acos(mm)
mm = math.degrees(mm)
# print(mm)


### FIXED CODE ###

import math

A,B,H,M = map(int,input().split())

H = (H*360/12)+(M*30/60)
M = M*360/60

a = abs(H-M)
# print(a)
ans = math.sqrt((A**2)+(B**2)-2*A*B*math.cos(math.radians(a)))
print(ans)
A, B, C, X, Y = map(int, input().split())

answer = 10**18
for c in range(2*10**6+1):
  a = X-c
  b = Y-c
  cost = C*c*2
  cost += max(a, 0)*A
  cost += max(b, 0)*B
  if answer > cost:
    answer = cost
print(answer)


### FIXED CODE ###

s=input()
print(700+int(s.count("o")*100))
#import numpy as np
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as comb_with

#A = int(input())
N,M= map(int,input().split())
#A = list(map(int,input().split()))
#B = list(map(int,input().split()))
#S= str(input())
left=1
right=N
for m in range(M):
    l,r = map(int,input().split())
    if left<=l and l<=right:
        left=l
    if left<=r and r<=right:
        right=r

    if right<l or r<left:
        p=0

if not p:
    print(p)
    exit()
print(right-left+1)


### FIXED CODE ###

#import numpy as np
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as comb_with

#A = int(input())
N,M= map(int,input().split())
#A = list(map(int,input().split()))
#B = list(map(int,input().split()))
#S= str(input())
p=1
left=1
right=N
for m in range(M):
    l,r = map(int,input().split())
    if left<=l and l<=right:
        left=l
    if left<=r and r<=right:
        right=r

    if right<l or r<left:
        p=0

if not p:
    print(p)
    exit()
print(right-left+1)
K = int(input())
mod = []
a[0] = 7%K
for i in range(1,K):
    a[i] = (a[i-1]*10 + 7)%K
 
for i in range(K):
    if a[i] == 0:
        print(a[i])
        break
 
else:
    print(-1)

### FIXED CODE ###

K = int(input())

n = 0
for i in range(1,K+1):
    n = (n*10 + 7)%K
    if n == 0:
        print(i)
        break

else:
    print(-1)
N = int(input())
X = map(int, input().split())
 
ans = 10000000000
for i in range(100):
  s = 0
  for j in range(N):
    s += (X[j]-i)**2
    
  ans = min(ans, s)
  
print(ans)

### FIXED CODE ###

N = int(input())
X = list(map(int, input().split()))
 
ans = 10000000000
for i in range(100):
  s = 0
  for j in range(N):
    s += (X[j]-i)**2
    
  ans = min(ans, s)
  
print(ans)
ans=0
n,s=map(int,input().split())
ar=list(map(int,input().split()))
mod=998244353

def func(b,sel,pos):
    global ans
    if b==s:
        ans+=pow(2,(n-sel),mod)
    #print(b,sel,pos,ans)
    if pos<n-1:
        func(b+ar[pos+1],sel+1,pos+1)
        if b<s:
            func(b,sel,pos+1)
    

func(ar[0],1,0)
func(0,0,0)
print(ans%mod)


### FIXED CODE ###

mod=998244353
n,s=map(int,input().split())
ar=list(map(int,input().split()))
dp=[0 for y in range(s+1)]
dp[0]=1
for i in range(n):
    for j in range(s,-1,-1):
        if j+ar[i]<=s:
            dp[j+ar[i]]=(dp[j]+dp[j+ar[i]])%mod
        dp[j]=(dp[j]*2)%mod
print(dp[s])
A,B,C,D,E,F = list(map(int,input().split()))

tmp = 0
for i in range(30):
  a = A*i
  if a*100 >= F:
    break
  for j in range(30):
    b = B*j
    if a+b == 0:
      continue
    w = (a+b)*100
    if w >= F:
      break
    for k in range(3000):
      c = C*k
      for l in range(3000):
        d = D*l
        s = c+d
        if w + s >= F:
          break
        if (c+d) <= (a+b)*E:
          if (s*100)/w > tmp:
            tmp = (s*100)/w
            ans = [s+w,s]
        else:
          break

print(" ".join(map(str,ans)))

### FIXED CODE ###

A,B,C,D,E,F = list(map(int,input().split()))

tmp = 0
ans = [0,0]
for i in range(31):
  a = A*i
  if a*100 >= F:
    break
  for j in range(31):
    b = B*j
    if a+b == 0:
      continue
    w = (a+b)*100
    if w >= F:
      break
    for k in range(3001):
      c = C*k
      for l in range(3001):
        d = D*l
        s = c+d
        if w + s > F:
          break
        if (c+d) <= (a+b)*E:
          if (s*100)/w >= tmp:
            tmp = (s*100)/w
            ans = [s+w,s]
        else:
          break

print(" ".join(map(str,ans)))
N, Q = map(int, input().split())

v = [[] for i in range(N)]
score = [0]*N

def dfs(cur,par):
  for chi in v[cur]:
    if chi == par:
      continue
    score[chi] += score[cur]
    dfs(chi, cur)
      
for i in range(N-1):
  a, b = map(int, input().split())
  a -= 1
  b -= 1
  v[a].append(b)
  v[b].append(a)

for j in range(Q):
  p, x = map(int, input().split())
  score[p-1] += x

dfs(0,-1)
score_int=[str(a) for a in score]
output= ' '.join(score_int)
print(output)
  

### FIXED CODE ###

import sys
input = sys.stdin.readline #for input speed
sys.setrecursionlimit(10**6) #for deep recursion

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

v = [[] for i in range(N)]
score = [0]*N

def dfs(cur,par):
  for chi in v[cur]:
    if chi == par:
      continue
    score[chi] += score[cur]
    dfs(chi, cur)
      
for i in range(N-1):
  a, b = map(int, input().split())
  a -= 1
  b -= 1
  v[a].append(b)
  v[b].append(a)

for j in range(Q):
  p, x = map(int, input().split())
  score[p-1] += x

dfs(0,-1)
score_int=[str(a) for a in score]
output= ' '.join(score_int)
print(output)
n,k= map(int, input().split())
if n+1>2*k:
    print(YES)
else:
    print(NO)


### FIXED CODE ###

n,k= map(int, input().split())
if n+1>=k*2:
    print("YES")
else:
    print("NO")
n = int(input())
m = int(input())
if (n>0 or n<10) and (m>0 or m<10):
    print(n*m)
else:
    print("-1")

### FIXED CODE ###

m = input()
n = m.split(" ")
if (int(n[0])<=9 and int(n[1])<=9):
    print(int(n[0])*int(n[1]))
else:
    print("-1")
a=int(input())
b=5
c=10

if a+b+c >= 22:
  print("bust")
else:
  print("win")

### FIXED CODE ###

a1,a2,a3=map(int, input().split()) 

if a1+a2+a3>=22:
    print("bust")
else:
    print("win")
n=int(input())
s=list(input() for _ in range(n))
m,i,f=0,0,0

for i in range(n):
    m +=s[i].count("AB")
    if s[i][0]=="B":
        i +=1
    if s[i][-1]=="A":
        f +=1
print(m+min(i,f))


### FIXED CODE ###

n,k=list(map(int,input().split()))
print(n-k+1)
q = input()
    
def common()
   X = raw_input()
   Y = raw_input()
       
   for i in range(0. len(X)+1):
      s[i] = 0
       
   for i in range(1, len(X)):
      t = s + []
      for j in range(1, len(Y)):
         if s[i-1] == j[i-1]:
            s[j+1] = t[j] + 1
         elif s[j+1] < s[j]:
            s[j+1] = s[j]
    
   return s[-1]
   
for k in range(0, q):
   common()

### FIXED CODE ###

def common():
   X = raw_input()
   Y = raw_input()
  
   s = [0 for i in range(len(Y)+1)]
 
   for j in range(0, len(X)):
      t = s + []
      for k in range(0, len(Y)):
         if X[j] == Y[k]:
            s[k+1] = t[k] + 1
         elif s[k+1] < s[k]:
            s[k+1] = s[k]
  
   print s[-1]
 
q = input()
for l in range(0, q):
   common()
n = input()
pi = 3.142592
R = 2 * pi * n
print(R)

### FIXED CODE ###

n = input()
pi = 3.142592
R = 2 * pi * int(n)
print(R)
a,b=map(int,input().split())
if a%b==0:
    print(a//b)
else:
    print(a//b+1)a,b=map(int,input().split())
if a%b==0:
    print(a//b)
else:
    print(a//b+1)

### FIXED CODE ###

a,b=map(int,input().split())
if a%b==0:
    print(a//b)
else:
    print(a//b+1)
#sort ??§??????????????????????????????
def isCLKWISE(ph) : return not ((ph[-1][0] - ph[-3][0])*(- ph[-3][1] + ph[-2][1]) - (ph[-2][0] - ph[-3][0])*(- ph[-3][1] + ph[-1][1] ) < 0)
      
def ConvexHullScan(P) :
 P = sorted(P)
 phU = []
 phU.append(P[0])
 phU.append(P[1])
 for p in P[2:] :
  phU.append(p)
  if isCLKWISE(phU) : continue
  while(True) :
   del phU[-2]
   try???:
    if isCLKWISE(phU) : break
   except IndexError : break
 phL = []
 phL.append(P[-1])
 phL.append(P[-2])
 for p in P[-3::-1] :
  phL.append(p)
  if isCLKWISE(phL) : continue
  while(True) :
   del phL[-2]
   try:
    if isCLKWISE(phL) : break
   except IndexError : break
 del phL[0]
 del phL[-1]
 ph = phU + phL
 return ph
  
n = range(int(input()))
P = [[int(x) for x in input().split()] for _ in n]
P = ConvexHullScan(P)
P.reverse()
print(len(P))
idx = min([[x[1][1],x[1][0],x[0]] for x in enumerate(P)])[2]
for p in P[idx:] + P[:idx] : print(p[0],p[1])

### FIXED CODE ###

def isCLKWISE(ph) : return not ((ph[-1][0] - ph[-3][0])*(- ph[-3][1] + ph[-2][1]) - (ph[-2][0] - ph[-3][0])*(- ph[-3][1] + ph[-1][1] ) < 0)
      
def ConvexHullScan(P):
    P = sorted(P)
    phU = [P[0],P[1]]
    for p in P[2:]:
        phU.append(p)
        while(True):
            try :
                if isCLKWISE(phU) : break
                else : del phU[-2]
            except IndexError : break
    phL = [P[-1],P[-2]]
    for p in P[-3::-1]:
        phL.append(p)
        while(True):
            try :
                if isCLKWISE(phL) : break
                else : del phL[-2]
            except IndexError : break
    ph = phU + phL[1:-1]
    return ph
  
P = [[int(x) for x in input().split()] for _ in range(int(input()))]
P = ConvexHullScan(P)
P.reverse()
print(len(P))
idx = min([[x[1][1],x[1][0],x[0]] for x in enumerate(P)])[2]
for p in P[idx:] + P[:idx] : print(p[0],p[1])
n, a = [int(input) for _ in range(2)]
print(n*n - a)

### FIXED CODE ###

n, a = [int(input()) for _ in range(2)]
print(n*n - a)
w, h = (int(x) for x in input().split())
ab = []
for _ in range(h):
    a, b = (int(x) for x in input().split())
    ab.append([a, b])

dp = [0 for i in range(w+1)]

for j in range(1, w+1):
    dp[j] = min(dp[j-a]+b for a, b in ab)

print(dp[w])

### FIXED CODE ###

h,n=map(int,input().split())
ab=[list(map(int,input().split())) for _ in range(n)]
 
max_a=max(a for a,_ in ab)
dp = [0] * (h+max_a)
 
for i in range(0,h+max_a):
    if i==0:
        dp[i]=0
    else:
        dp[i]=min(dp[i-a]+b for a,b in ab)
print(dp[h])