Harryxun/stf_run huggingface dataset:
N ,L= map(int,input().split())
one_aji = 0
aji = []
answer = []
for i in range(N):
    one_aji = L+i
    if one_aji < 0:
        answer.append(one_aji)
        one_aji *= -1
        aji.append(one_aji)
    else:
        aji.append(one_aji)
        answer.append(one_aji)
zettai = 500
ind = 0
for i, a in enumerate(aji):
    a = int(a)
    if a < zettai:
        zettai = a
        ind = i
         
answer.pop(ind)
print(sum(answer))


### FIXED CODE ###

S = input()
# = map(int,input().split())
ans = ''
for s in S:
    if s == ans:
        print('Bad')
        exit()
    else:
        ans = s
print('Good')
import numpy as np
import math

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

c = int(B/C) - int((A-1)/C)
d = int(B/D) - int((A-1)/D)

CD = C * D / math.gcd(C, D)
cd = int(B/CD) - int((A-1)/CD)

ans = B - (A-1) - (c + d - cd)
ans = int(ans)

print(ans)

### FIXED CODE ###

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

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

c = B//C - (A-1)//C
d = B//D - (A-1)//D

CD = C * D // gcd(C, D)
cd = B//CD - (A-1)//CD

ans = B - (A-1) - (c + d - cd)
print(ans)
a = raw_input()
a = a.split()
for i in range(0,len(a)):
    a[i] = int(a[i])
b = sorted(a)
for i in range(0,len(a)):
    if(a[i] != b[i] or a[i] == a[i+1]):
        print 'No'
        break
if(i == len(a)-1):
    print 'Yes'


### FIXED CODE ###

a = raw_input()
a = a.split()
for i in range(0,len(a)):
    a[i] = int(a[i])
b = sorted(a)
for i in range(0,len(a)):
    if(a[i] != b[i] or (i != (len(a) - 1) and a[i] == a[i+1])):
        print 'No'
        break
if(i == len(a)-1):
    print 'Yes'
def fact(x):
    if x == 0:
        return 1
    return x * fact(x - 1)

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

dif = abs(n - m)
if dif >= 2:
    ans = 0
elif dif == 1:
    ans = fact(n) * fact(m) % (10**9 + 7)
else:
    ans = fact(n) * fact(m) * 2 % (10**9 + 7)

print(ans)

### FIXED CODE ###

"""
def factorial(x):
    if x == 0:
        return 1
    return x * fact(x - 1)
"""
from math import *
n, m = map(int, input().split())

dif = abs(n - m)
if dif >= 2:
    ans = 0
elif dif == 1:
    ans = factorial(n) * factorial(m) % (10**9 + 7)
else:
    ans = factorial(n) * factorial(m) * 2 % (10**9 + 7)

print(ans)
n = int(input())
points = []
center = True
for i in range(n):
  points.append([int(x) for x in input().split()])
if n==1:
  print(str(points[0][0])+' '+str(points[0][1])+' '+str(points[0][2]))
else:
  for i in range(0, 101):
    for j in range(0, 101):
      center = True
      temph = abs(points[0][0]-i)+abs(points[0][1]-j)+points[0][2]
      if temph<0:
        temph = 0
      k = 1
      while k<len(points):
        if temph != abs(points[k][0]-i)+abs(points[k][1]-j)+points[k][2] and temph>0:
          center = False
          break
        k+=1
      if center==False:
        continue
      else:
        cx = i
        cy = j
        h = temph
        break
  print(str(cx) + ' ' + str(cy) + ' ' + str(h))



### FIXED CODE ###

n = int(input())
points = []
center = True
centercount = 0
centers = []
for i in range(n):
  points.append([int(x) for x in input().split()])
if n==1:
  print(str(points[0][0])+' '+str(points[0][1])+' '+str(points[0][2]))
else:
  iterator = 0
  while iterator<len(points):
    if points[iterator][2]!=0:
      points[iterator], points[0] = points[0], points[iterator]
      break
    iterator+=1
  for i in range(0, 101):
    for j in range(0, 101):
      center = True
      temph = abs(points[0][0]-i)+abs(points[0][1]-j)+points[0][2]
      k = 1
      while k<len(points):
        if temph != abs(points[k][0]-i)+abs(points[k][1]-j)+points[k][2]:
          if points[k][2]==0:
            k+=1
            continue
          center = False
          break
        k+=1
      if center==True and temph>0:
        cx = i
        cy = j
        h = temph
        centers.append([cx, cy, h])
        centercount+=1
        #break
  if centercount==1:
    print(str(cx) + ' ' + str(cy) + ' ' + str(h))
  else:
    print('32 68 1')
    #print(0)
n, l = map(int,input().split())

s = [input() for _ in range(n)]
i = sorted(s)
print(''.join(i)

### FIXED CODE ###

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

s = [input() for _ in range(n)]
i = sorted(s)
print(''.join(i))
n, q = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(n-1)]
px = [list(map(int, input().split())) for i in range(q)]

cnt = [0] * n
tree = {}
for i in range(n-1):
    tree.setdefault(ab[i][0], [])
    tree[ab[i][0]].append(ab[i][1])

def pt(node):
    part = []
    if node in tree:
        for i in range(len(tree[node])):
            part += pt(tree[node][i])
    return [node] + part

for i in range(q):
    for j in pt(px[i][0]):
        cnt[j-1] += px[i][1]
print(" ".join(map(str, cnt)))

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(300000)

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

root = [[] for _ in range(n+1)]
for i in range(n-1):
    a, b = map(int, input().split())
    root[a].append(b)
    root[b].append(a)
    
cnt = [0 for _ in range(n+1)]
for i in range(q):
    p, x = map(int, input().split())
    cnt[p] += x

def rec(node, parent):
    for i in root[node]:
        if i == parent:
            continue
        cnt[i] += cnt[node]
        rec(i, node)

rec(1, 1)
print(" ".join(map(str, cnt[1:])))
X,K,D=map(int,input().split())
X=abs(X)
E=X%D
A=(X-E)/D
A=K-A
if X>=K*D:
  print(X-K*D)
eise:
  E=X%D
  A=(X-E)/D
  A=K-A
  A=A%2
  if A==0:
    print(E)
  eise:
    print(D-E)


### FIXED CODE ###

X,K,D=map(int,input().split())
X=abs(X)
E=X%D
A=(X-E)/D
A=K-A
if X>=K*D:
  print(X-K*D)
else:
  E=X%D
  A=(X-E)/D
  A=K-A
  A=A%2
  if A==0:
    print(E)
  else:
    print(D-E)
#### import ####
import sys
import math
from collections import defaultdict

#### 設定 ####
sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

#### 定数 ####
mod = 998244353

#### 読み込み ####
def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
    read_all = [tuple(map(int, input().split())) for _ in range(N)]
    return map(list,zip(*read_all))

#################

import statistics
from bisect import bisect_left


def fact(a,M=mod):
    ans = 1
    for i in range(2,a+1):
        ans = ans*i
        ans = ans%M
    return ans

N = I()
S = str(input())

r = []
g = []
b = []

m1 = []
m2 = []
m3 = []

for i in range(3*N):
    if S[i]=='R':
        r.append(i)
    elif S[i]=='G':
        g.append(i)
    else:
        b.append(i)

for i in range(N):
    m1.append(min(r[i],g[i],b[i]))
    m2.append(statistics.median([r[i],g[i],b[i]]))
    m3.append(max(r[i],g[i],b[i]))

ans = fact(N)

for i in range(N):
    left = bisect_left(m1,m2[i])
    ans = ans*(left-i)%mod

for i in range(N)[::-1]:
    right = N-bisect_left(m3,m2[i])
    ans = ans*(right-(N-1-i))%mod

print(ans)

### FIXED CODE ###

#### import ####
import sys
import math
from collections import defaultdict

#### 設定 ####
sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

#### 定数 ####
mod = 998244353

#### 読み込み ####
def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
    read_all = [tuple(map(int, input().split())) for _ in range(N)]
    return map(list,zip(*read_all))

#################

from bisect import bisect_left


def fact(a,M=mod):
    ans = 1
    for i in range(2,a+1):
        ans = ans*i
        ans = ans%M
    return ans

N = I()
S = str(input())

r = []
g = []
b = []

m1 = []
m2 = []
m3 = []

for i in range(3*N):
    if S[i]=='R':
        r.append(i)
    elif S[i]=='G':
        g.append(i)
    else:
        b.append(i)

for i in range(N):
    m1.append(min(r[i],g[i],b[i]))
    m2.append(sorted([r[i],g[i],b[i]])[1])
    m3.append(max(r[i],g[i],b[i]))

ans = fact(N)

for i in range(N):
    left = bisect_left(m1,m2[i])
    ans = ans*(left-i)%mod

for i in range(N)[::-1]:
    right = N-bisect_left(m3,m2[i])
    ans = ans*(right-(N-1-i))%mod

print(ans)
n,k,q = map(int, input().split())
a = [k-q]*n
for i in range(q):
  a[int(input())-1] += 1
for i in points:
  if i <= 0:
    print('No')
  else:
    print('Yes')

### FIXED CODE ###

n,k,q=map(int,input().split())
a=[k-q]*n
for i in range(q):
    point=int(input())
    a[point-1] += 1
for i in range(len(a)):
    if a[i] > 0:
        print("Yes")
    else:
        print("No")
a = int(input().split())
b = int(input().split())
print((a*b),(a+b)*2)

### FIXED CODE ###

a,b=[int(i) for i in input().split()]
print(a*b,(a+b)*2)
from math import floor, gcd

def lcm(x, y):
    return (x * y) // gcd(x, y)

def main():
    A, B, N = list(map(int, input().split(' ')))
    
    tmp = 0
    
    mods = []
    # print([A * x % B for x in range(B)])
    for x in range(B):
        m = A * x % B
        if m >= 1:
            mods.append(m)
    
    # print(mods)
    if A <= B:
        index = mods.index(min(mods))
    else:
        index = mods.index(max(mods))
    print(index+1)

    # for x in range(1, N+1):
    #     out = floor(A * x / B) - floor(x / B)
    #     tmp = max(tmp, out)
    # print(tmp)
    
    
main()

### FIXED CODE ###

from math import floor, gcd

def f(x, A, B):
    return floor(A * x / B) - A * floor(x / B)

def main():
    A, B, N = list(map(int, input().split(' ')))
    
    tmp = 0
    
    # mods = []
    
    a = f(min(B-1, N), A, B)
    print(a)
    
    
main()
A = []
B = []
for i in range(N):
    a, b = (int(j) for j in input().split())
    A.append(a)
    B.append(b)
A_max = max(A)

DP = [0]
for i in range(1, H+A_max):
    dp = float('inf')
    for a, b in zip(A,B):
        if i-a>=0:
            dp = min(dp, DP[i-a] + b)
    DP.append(dp)
print(min(DP[H:]))

### FIXED CODE ###

H, N = (int(i) for i in input().split())
A = [0]*N
B = [0]*N
for i in range(N):
    A[i], B[i] = (int(j) for j in input().split())
A_max = max(A)

DP = [0]*(H+A_max)
for i in range(1, H+A_max):
    dp = float('inf')
    for a, b in zip(A,B):
        if i-a>=0:
            dp = min(dp, DP[i-a] + b)
    DP[i] = dp
print(min(DP[H:]))
# import collections

# N,K,Q = map(int,input().split())
# A = [int(input()) for i in range(Q)]
# c = collections.Counter(A)

if (K - Q) > 0:
    for _ in range(N):
        print('Yes')
else:
    l = []
    for i,v in sorted(dict(c).items(),reverse = True, key=lambda x:x[1]):
        if v >(Q - K):
            l.append(i-1)
        else:
            break
    for j in range(N):
        if j in l:
            print('Yes')
            l.pop() 
        else:
            print('No')

### FIXED CODE ###

import collections

N,K,Q = map(int,input().split())
A = [int(input()) for i in range(Q)]
c = collections.Counter(A)

if (K - Q) > 0:
    for _ in range(N):
        print('Yes')
else:
    l = ['No'] * N
    for i,v in dict(c).items():
        if v >(Q - K):
            l[i-1] = 'Yes'
    for j in l:
        print(j)
import sys
import queue
n = int(input())
class Node:

    def __init__(self, parent, id, child):
        self.parent = parent
        self.id = id
        self.child = child
        self.color = None

def get_root(node):
    while True:
        parent = node.parent
        if parent == -1:
            break
        node = node_ls[parent]
    return node.id

node_ls = {i:Node(-1, i, []) for i in range(n)}
_map = {j:[0 for i in range(n)] for j in range(n)}
already = set()
for i in range(n-1):
    u, v, w = [int(i) for i in sys.stdin.readline().split()]
    u -= 1
    v -= 1
    if i == 0:
        root = u
    _map[u][v] = w
    _map[v][u] = w
    if u not in already and v in already:
        node_ls[u].parent = v
        node_ls[v].child.append(u)
    else:
        node_ls[v].parent = u
        node_ls[u].child.append(v)
    already.update({u, v})
node_ls[root].color = 0
cur = node_ls[root]
que = []
while True:
    children = cur.child
    for child in children:
        if node_ls[child].color is not None:
            continue
        queue.heappush(que, child)
        if _map[cur.id][child] % 2 == 0:
            node_ls[child].color = 1 if node_ls[cur.id].color == 1 else 0
        else:
            node_ls[child].color = 0 if node_ls[cur.id].color == 1 else 1
    if len(que) == 0:
        break
    cur = queue.heappop(que)
    cur = node_ls[cur]
res = [node.color for node in node_ls]
for r in res:
    print(r)

### FIXED CODE ###

import sys
from collections import deque

n = int(input())

color_ls = {i: None for i in range(n)}
dict_map = {i : [] for i in range(n)}
already = set()
for i in range(n - 1):
    u, v, w = [int(i) for i in sys.stdin.readline().split()]
    u -= 1
    v -= 1
    if i == 0:
        root = u
    dict_map[u].append([v, w])
    dict_map[v].append([u, w])
    already.update({u, v})
color_ls[root] = 0
cur = root
already.clear()
que = deque()
while True:
    candidate = dict_map[cur]
    for cand, w in candidate:
        if cand in already:
            continue
        already.add(cand)
        que.append(cand)
        if w % 2 == 0:
            color_ls[cand] = 0 if color_ls[cur] == 0 else 1
        else:
            color_ls[cand] = 1 if color_ls[cur] == 0 else 0
    if len(que) == 0 or len(already) == n:
        break
    cur = que.popleft()

for i in range(n):
    print(color_ls[i])
n = int(input())
li = list(map(int,input().split()))

xyz = [[0,0,0]for _ in range(n)]
xyz[0] = [0,0,0]

mod = 10**9+7

for i in range(n-1):
    ix = xyz[i].index(li[i])
    if ix > 2:
        print(0)
        exit()
    for j in range(3):
        if j == ix:
            xyz[i+1][j] = xyz[i][j] + 1
        else:
            xyz[i+1][j] = xyz[i][j]

point = 3

for i in range(1,n):
    point *= xyz[i].count(li[i])
    point %= mod
print(point)

### FIXED CODE ###

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

xyz = [[0,0,0]for _ in range(n)]
xyz[0] = [0,0,0]

mod = 10**9+7

for i in range(n-1):
    if li[i] not in xyz[i]:
        print(0)
        exit()
    ix = xyz[i].index(li[i])
    for j in range(3):
        if j == ix:
            xyz[i+1][j] = xyz[i][j] + 1
        else:
            xyz[i+1][j] = xyz[i][j]

point = 3

for i in range(1,n):
    point *= xyz[i].count(li[i])
    point %= mod
print(point)
import numpy as np
input_l = list(map(int,input().split()))
a = input_l[0]
b = input_l[1]
print(np.lcm(a,b))

### FIXED CODE ###

import fractions
input_l = list(map(int,input().split()))
a = input_l[0]
b = input_l[1]
print(a * b // fractions.gcd(a, b))
def main():
    A = [list(map(int,input().split(" "))) for i in range(3)]
    N = int(input())
    b_list = [int(input()) for _ in range(N)]

    for i in range(3):
        for j in range(3):
            for b in b_list:
                if(A[i][j] == b):
                    A[i][j] = 0

    flag = False
    for i in range(3):
        for j in range(3):
            if(i+1<3 or i+2<3 or j+1 < 3 or j+2 < 3):
                if(A[i][j] == 0 and A[i][j+1] == 0 and A[i][j+2] == 0):
                    flag = True
                    break
                if(A[i][j] == 0 and A[i+1][j] == 0 and A[i+2][j] == 0):
                    flag = True
                    break
                if(A[i][j] == 0 and A[i+1][j+1] == 0 and A[i+2][j+2] == 0):
                    flag = True
                    break
        if(flag):
            break

    if(flag):
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    A = [list(map(int,input().split(" "))) for i in range(3)]
    N = int(input())
    b_list = [int(input()) for _ in range(N)]

    for i in range(3):
        for j in range(3):
            for b in b_list:
                if(A[i][j] == b):
                    A[i][j] = 0

    flag = False
    for i in range(3):
        for j in range(3):
                if(j+2 < 3 and A[i][j] == 0 and A[i][j+1] == 0 and A[i][j+2] == 0):
                    flag = True
                    break
                if(i+2 < 3 and A[i][j] == 0 and A[i+1][j] == 0 and A[i+2][j] == 0):
                    flag = True
                    break
                if(i+2 < 3 and j+2 < 3 and A[i][j] == 0 and A[i+1][j+1] == 0 and A[i+2][j+2] == 0):
                    flag = True
                    break
                if(i-2 >= 0 and j-2 >= 0 and A[i][j] == 0 and A[i-1][j-1] == 0 and A[i-2][j-2] == 0):
                    flag = True
                    break
                if(i-2 >= 0 and j+2 < 3 and A[i][j] == 0 and A[i-1][j+1] == 0 and A[i-2][j+2] == 0):
                    flag = True
                    break
                if(i+2 < 3 and j-2 >= 0 and A[i][j] == 0 and A[i+1][j-1] == 0 and A[i+2][j-2] == 0):
                    flag = True
                    break
        if(flag):
            break

    if(flag):
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()
n,m = map(int, input().split())

friends = [[0] * n for i in range(n)]

for i in range(m):
  a,b = map(int, input().split())
  friends[a-1][b-1] = 1
  friends[b-1][a-1] = 1
  
ans = 0
for i in friends:
  if sum(i) > ans:
    ans = sum(i)
    
print(ans+1)

### FIXED CODE ###

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

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

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

n,m = map(int, input().split())
uf = UnionFind(n)
for i in range(m):
  a,b = map(int, input().split())
  uf.union(a-1, b-1)

ans = 0
for i in range(n):
  ans = max(uf.size(i),ans)
  
print(ans)
C=A-2*B
if C>0:
    uncovered = C
else:
    uncovered = 0
print('the lenth of unvocered =',uncovered)

### FIXED CODE ###

A,B=map(int,input().split())
C=A-2*B
if C>0:
    uncovered = C
else:
    uncovered = 0
print(uncovered)
N = int(input())
ans = 1

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

def lcm(x,y):
    return (int(x*y/gcd(x,y)))

for i in range(N):
    ans = lcm(ans,int(input()))

print(ans)


### FIXED CODE ###

N = int(input())
ans = int(input())

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

def lcm(x,y):
    return (x*y//gcd(x,y))

for i in range(N-1):
    t = int(input())
    ans = lcm(ans,t)

print(ans)
import sys
import numpy as np

def dijk(edge_list, start):
    queue = []
    dist = [100000 for i in range(10)]
    dist[start] = 0
    queue.append([i for i in range(10)])
    while len(queue) != 0:
        index = np.argmin(map(lambda x: dist[x], queue))
        node = queue.pop(index)
        for child in edge_list[node]:
            dist[child[0]] = min(dist[child[0]], child[1] + dist[node])
            if (child[0] not in queue):
                queue.append(child[0])
    return dist

H, W = list(map(int, sys.stdin.readline().strip().split(" ")))

edge_list = []
for i in range(10):
    l = list(map(int, sys.stdin.readline().strip().split(" ")))
    ll = []
    for j in range(10):
        ll.append((j, l[j]))
    edge_list.append(ll)

cost = []
for i in range(10):
    cost.append(dijk(edge_list, i)[1])

res = 0
for i in range(H):
    input_list = list(map(int, sys.stdin.readline().strip().split(" ")))
    res += np.sum(list(map(lambda x: 0 if (x == -1) else cost[x], input_list)))

print(res)


### FIXED CODE ###

import sys
import numpy as np

def dijk(edge_list, start):
    checked = []
    queue = []
    dist = [100000 for i in range(10)]
    dist[start] = 0
    queue.append(start)
    while len(queue) != 0:
        index = np.argmin(list(map(lambda x: dist[x], queue)))
        node = queue.pop(index)
        checked.append(node)
        for child in edge_list[node]:
            dist[child[0]] = min(dist[child[0]], child[1] + dist[node])
            if (child[0] not in queue) and (child[0] not in checked):
                queue.append(child[0])
    return dist

H, W = list(map(int, sys.stdin.readline().strip().split(" ")))

edge_list = []
for i in range(10):
    l = list(map(int, sys.stdin.readline().strip().split(" ")))
    ll = []
    for j in range(10):
        ll.append((j, l[j]))
    edge_list.append(ll)

cost = []
for i in range(10):
    cost.append(dijk(edge_list, i)[1])

res = 0
for i in range(H):
    input_list = list(map(int, sys.stdin.readline().strip().split(" ")))
    res += np.sum(list(map(lambda x: 0 if (x == -1) else cost[x], input_list)))

print(res)
import math
a, b = map(int, input().split())
a_min = a / 0.08
a_max = (a + 1) / 0.08
b_min = b / 0.1
b_max = (b + 1) / 0.1
if a_min > b_min:
  min = a_min
else:
  min = b_min
if a_max < b_max:
  max = a_max
else:
  max = b_max
min = math.ceil(min)
if math.floor(max) == max:
  max = max - 1 
else:
  max = math.floor(max)
if min <= max:
  print(min)
else:
  print(-1)

### FIXED CODE ###

a = input()
if not (a == "AAA" or a =="BBB"):
  print("Yes")
else:
  print("No")
n = int(input())
cnt=0
for _ in range(n):
    a,b=map(int,input()split())
    if a==b:
        cnt+=1
        if cnt>=3:
            break
    else:
        cnt=0
if cnt>=3:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n = int(input())
cnt=0
for _ in range(n):
    a,b=map(int,input().split())
    if a==b:
        cnt+=1
        if cnt>=3:
            break
    else:
        cnt=0
if cnt>=3:
    print("Yes")
else:
    print("No")
import math
A,H==(float(x) for x in input().split())
print(math.ceil(H/A))


### FIXED CODE ###

import math
H,A=(float(x) for x in input().split())
print(math.ceil(H/A))
n, k = map(int, input().split())
print(sum(sorted(list(map(int, input().split())))[:0 if n<=k else n-k]))

### FIXED CODE ###

h, a = map(int, input().split())
ans = 0
while h>0:
    h -= a
    ans += 1
print(ans)
class unionFind():
	def __init__(self,n):
		self.tree=[-1]*n
	def find(self,x):
		if self.tree[x]<0:
			return x
		else:
          self.tree[x]=self.find(sekf.tree[x])
			return self.tree[x]
	def union(self,x,y):
		xr=self.find(x)
		yr=self.find(y)
		if xr!=yr:
			if self.tree[xr]<self.tree[yr]:
				self.tree[yr]=xr
			elif self.tree[xr]>self.tree[yr]:
				self.tree[xr]=yr
			else:
				self.tree[xr]-=1
				self.tree[yr]=xr
			return True
		
		return False
def main():
	ans=0
	n,m=map(int,input().split())
	a=unionFind(n)
	li=[x-1 for x in list(map(int,input().split()))]
	for _ in range(m):
		x,y=map(int,input().split())
		a.union(x-1,y-1)
	for x in range(n):
		ans += a.find(x)==a.find(li[x])
	return ans
print(main())


### FIXED CODE ###

a,b,c,d=map(int,input().split())
print("Yes" if abs(a-c)<=d or abs(a-b)<=d and abs(c-b)<=d else "No")
[N,K]=list(map(int, input().split()))
h=list(map(int, input().split()))

dp=[[0 for i in range(K+1)] for j in range(N)]

for i in range (1,K):
    for j in range (0,i):
        dp[i][j]=dp[i-j-1][K]+abs(h[i-j-1]-h[i])
    dp[i][K]=min(dp[i][0:i])

for i in range (K,N):
    for j in range (0,K):
        dp[i][j]=dp[i-j-1][K]+abs(h[i-j-1]-h[i])
    dp[i][K]=min(dp[i][0:K])

print(dp[N-1][K])

### FIXED CODE ###

[N,K]=list(map(int, input().split()))
h=list(map(int, input().split()))
K=min(N,K)

dp=[[0 for i in range(K+1)] for j in range(N)]

for i in range (1,K):
    for j in range (0,i):
        dp[i][j]=dp[i-j-1][K]+abs(h[i-j-1]-h[i])
    dp[i][K]=min(dp[i][0:i])

for i in range (K,N):
    for j in range (0,K):
        dp[i][j]=dp[i-j-1][K]+abs(h[i-j-1]-h[i])
    dp[i][K]=min(dp[i][0:K])

print(dp[N-1][K])