Harryxun/stf_run huggingface dataset:
N,T=(i for i in input().split())
t = [int(i) for i in input().split()]
a=0
for b in range(N):
    if t[b] < T
        a = a + t[b]
    else:
        a = a + T

print(a)

### FIXED CODE ###

N,T=(int(i) for i in input().split())
t = [int(i) for i in input().split()]
a=0
for b in range(N-1):
    if (t[b+1] - t[b]) < T:
        a = a + t[b+1] - t[b]
    else:
        a = a + T
a = a+T
print(a)
def gcd(a,b):
    while b != 0:
        a,b=b,a%b
    return a

n=int(input())
a=[0] + list(map(int,input().split())) + [0]#a[n+1]=0とするため

l=[0]*(n+2)
r=[0]*(n+2)#r[n+1]=0としたいから
for i in range(1,n+1):
    l[i] = gcd(l[i-1],a[i])
for i in range(n,0,-1):
    r[i] = gcd(r[i+1],a[i])

z=[gcd(l[i-1],r[i+1]) for i in range(1,n+1)]

print(max(z))


### FIXED CODE ###

a,b,t = map(int,input().split())
print(b*(t//a))
n,m = map(int,input().split())
pS_list = [list(input().split()) 
           for nesya in range(m)]
ac = 0
wa = 0
q_list = [0]*n
for ps in ps_list:
  p = int(ps[0])-1
  s = ps[1]
  if q_list[p] == 1:
    continue
  if s == 'WA':
    q_list[p] -= 1
  else:
    a = q_list[p]
    wa -= a
    ac += 1
    q_list[p] = 1
print(ac,wa)

### FIXED CODE ###

n,m = map(int,input().split())
pS_list = [list(input().split()) 
           for nesya in range(m)]
ac = 0
wa = 0
q_list = [0]*n
for ps in pS_list:
  p = int(ps[0])-1
  s = ps[1]
  if q_list[p] == 1:
    continue
  if s == 'WA':
    q_list[p] -= 1
  else:
    a = q_list[p]
    wa -= a
    ac += 1
    q_list[p] = 1
print(ac,wa)
import numpy as np

H, W, M = map(int, input().split())
h_t = [0]*H
w_t = [0]*W
t = np.zeros((H, W))
for i in range(M):
    h, w = map(int, input().split())
    t[h-1][w-1] = 1
    h_t[h-1]+=1
    w_t[w-1]+=1
h_max = max(h_t)
h_max_list = [i for i in range(len(h_t)) if h_t[i] == h_max]
w_max = max(w_t)
w_max_list = [i for i in range(len(w_t)) if w_t[i] == w_max]

for h in h_max_list:
    for w in w_max_list:
        if t[h][w] == 0:
            print(h_max + w_max)
            exit()
print(h_max + w_max - 1)

### FIXED CODE ###

import numpy as np

H, W, M = map(int, input().split())
h_t = [0]*H
w_t = [0]*W
t = {}
for i in range(M):
    h, w = map(int, input().split())
    t[(h-1, w-1)] = 1
    h_t[h-1]+=1
    w_t[w-1]+=1
h_max = max(h_t)
h_max_list = [i for i in range(len(h_t)) if h_t[i] == h_max]
w_max = max(w_t)
w_max_list = [i for i in range(len(w_t)) if w_t[i] == w_max]

for h in h_max_list:
    for w in w_max_list:
        if (h, w) not in t:
            print(h_max + w_max)
            exit()
print(h_max + w_max - 1)
l,r = map(int, input().split())
if r-l >= 2019:
  print(0)
else:
  m = 2018
  for i in range(l, r):
    for j in range(i+1, r+1):
      if i*j % 2019 < m:
        m = i*j % 2019

print(m)

### FIXED CODE ###

l,r = map(int, input().split())
if r-l >= 2019:
  print(0)
  exit()
else:
  m = 2018
  for i in range(l, r):
    for j in range(i+1, r+1):
      if i*j % 2019 < m:
        m = i*j % 2019

print(m)
from collections import defaultdict
import copy

def readInput():
	return [int(i) for i in input().split(" ")]

(R, C) = readInput()
N = int(input())
rowIdx = set() 
cover = set()
grid = defaultdict(lambda:None)
rowGrid = defaultdict(set)
for i in range(N):
	(r, c, a) = readInput()
	r -= 1
	c -= 1
	rowGrid[r].add(c)
	grid[(r, c)] = a 
	rowIdx.add(r)

pairIdx = copy.copy(rowIdx)	
for i in rowIdx:
	tempRow = rowGrid[i]
	tempRow.difference_update(cover)
	if (len(tempRow) is 0):
		continue
	pairIdx.remove(i)
	for j in pairIdx:
		tempPair = rowGrid[j]
		mark = 1
		for k in tempRow:
			if (grid[(j, k)] is now None):
				diff = grid[(i, k)] - grid[(j, k)]
				mark = 0 
				break
		if (mark is 1):
			continue
		for m in tempRow:
			anchor = grid[(i, m)]
			anchorP = grid[(j, m)]
			if (anchorP is None and anchor < diff):
				print('No')
				exit()
			elif (anchorP is not None and anchor - anchorP != diff):
				print('No')
				exit()
		for n in tempPair:
			anchor = grid[(j, n)]
			anchorP = grid[(i, n)]
			if (anchorP is None and anchor < -diff):
				print('No')
				exit()
	cover &= tempRow
	if (len(cover) is C):
		break
print('Yes')

### FIXED CODE ###

from collections import defaultdict
import sys
sys.setrecursionlimit(10**6)

def ReadInput():
	return [int(i) for i in input().split(" ")]

(R, C) = ReadInput()
N = int(input())
VectorSet = set() 
Grid = defaultdict(list)
for i in range(N):
	(r, c, a) = ReadInput()
	Grid[("R", r)].append((("C", c), a))
	Grid[("C", c)].append((("R", r), a))
	VectorSet.add(("R", r))
	VectorSet.add(("C", c))

def iteration(vector):
	VectorSet.discard(vector)
	for (v, a) in Grid[vector]:
		temp = a - VectorCover[vector]
		if (v in VectorCover):
			if(temp != VectorCover[v]):
				print("No")
				exit()
		else:
			VectorCover[v] = temp
			iteration(v) 

while(len(VectorSet) != 0):
	vector = VectorSet.pop()
	VectorCover = dict() 
	VectorCover[vector] = 0
	iteration(vector)
	minR = min(a for (p, a) in VectorCover.items() if (p[0] == "R"))
	minC = min(a for (p, a) in VectorCover.items() if (p[0] == "C"))
	if (minR + minC < 0):
		print("No")
		exit()

print("Yes")
r,d,x = map(int, input().split())
result=[]
result.append(x)
for i in range(10):
	x=r*x-d
	result.append(x)
for i in result[1:11]:
	print(int(i))

### FIXED CODE ###

a, b = map(int, input().split())
if a>=13:
  print(int(b))
elif 6<=a<=12:
  print(int(b/2))
else:
  print(int(0))
H,W = map(int,input().split())
map = []
INF = 10**8
for _ in range(H):
    map.append(input())

dp = [[0 for i in range(W)] for i in range(H)]

for i in range(H):
    for j in range(W):
        if i == 0 and j == 0:
            if map[i][j] == '#':
                dp[i][j] = 1
        elif i == 0:
            flag = 0
            if map[i][j] == '#' and map[i][j-1] == '.':
                flag = 1
            dp[i][j] = flag + dp[i][j-1]
        elif j == 0:
            flag = 0
            if MAP[i][j] == "#" and MAP[i-1][j] == ".":
                flag = 1
            dp[i][j] = flag + dp[i-1][j]
        else:
            flag1 = 0
            flag2 = 0
            if MAP[i][j] == "#" and MAP[i][j-1] == ".":
                flag1 = 1
            if MAP[i][j] == "#" and MAP[i-1][j] == ".":
                flag2 = 1
            dp[i][j] = min(dp[i][j-1]+flag1,dp[i-1][j]+flag2)

pritn(dp[H-1][W-1])


### FIXED CODE ###

H,W = map(int,input().split())
map = []
INF = 10**8
for _ in range(H):
    map.append(input())

dp = [[0 for i in range(W)] for i in range(H)]

for i in range(H):
    for j in range(W):
        if i == 0 and j == 0:
            if map[i][j] == '#':
                dp[i][j] = 1
        elif i == 0:
            flag = 0
            if map[i][j] == '#' and map[i][j-1] == '.':
                flag = 1
            dp[i][j] = flag + dp[i][j-1]
        elif j == 0:
            flag = 0
            if map[i][j] == "#" and map[i-1][j] == ".":
                flag = 1
            dp[i][j] = flag + dp[i-1][j]
        else:
            flag1 = 0
            flag2 = 0
            if map[i][j] == "#" and map[i][j-1] == ".":
                flag1 = 1
            if map[i][j] == "#" and map[i-1][j] == ".":
                flag2 = 1
            dp[i][j] = min(dp[i][j-1]+flag1,dp[i-1][j]+flag2)

print(dp[H-1][W-1])
n,m=map(int,input().split())
a=[]
b=0
c=0
d=1
e=0
for i in range(m):
    a.append(int(input()))
for j in range(m-1):
    if(a[j]+1==a[j+1]):
        print('0')
        break    
z=list(set(a))
z=sorted(z)
z.append(0)     
for i in range(n):
    if(z[b]==i+1):
        b+=1    
        continue    
    else:
        c=d+e
        e=d
        d=c
print({0}.format(c%100000007)

### FIXED CODE ###

n,m=map(int,input().split())
a=[]
for i in range(m):
    a.append(int(input()))
flag=0
c=[0 for i in range(n+1)]
b=0
a.append(-2)
c[0]=1
if(a[b]==1):
    c[1]=0
    b+=1
else:
    c[1]=1
for i in range(2,n+1):
    if (i==a[b]):
        c[i]=0
        b+=1
    else:
        c[i]=c[i-1]+c[i-2]
        c[i]=c[i] %1000000007
print('{0}'.format(c[n]))
import sys
sys.setrecursionlimit(100001)

CONST = 1000000007

def noboru(i, a2, a1):
    if (i == 0 or i == 1):
        return a1 % CONST
    elif (i == 2):
        return a2 % CONST
    else:
        return noboru(i-1, (a2+a1) % CONST, a2 % CONST)


def func(N, M, a):
    ans = 1
    pos = 0
    for i in range(M):
        if (pos == a[i]):
            return 0
        else:
            ans = (ans * noboru(a[i] - pos - 1, 2, 1)) % CONST
            pos = a[i] + 1
    ans = (ans * noboru(N - pos, 2, 1)) % CONST
    return ans

N, M = map(int, input().split(" "))
a = [int(input()) for _ in range(M)]
print(func(N, M, a))
# print(noboru(10000, 2, 1))
# print(sys.getrecursionlimit())

### FIXED CODE ###

CONST = 1000000007

def noboru(n):
    a1 = 1
    a2 = 2
    ans = 0
    if (n == 0 or n == 1): return a1
    elif (n == 2): return a2
    else:
        for i in range(1, n-1):
            ans = a2 + a1
            a1 = a2
            a2 = ans
        return a2

def func(N, M, a):
    ans = 1
    pos = 0
    for i in range(M):
        if (pos == a[i]):
            return 0
        else:
            ans = (ans * noboru(a[i] - pos - 1)) % CONST
            pos = a[i] + 1
    ans = (ans * noboru(N - pos)) % CONST
    return ans

N, M = map(int, input().split(" "))
a = [int(input()) for _ in range(M)]
print(func(N, M, a))
A,B,C=[int(i) for i in input().split()]
if A*C <B:
  print C
else:
  print B % A

### FIXED CODE ###

A,B,C=[int(i) for i in input().split()]
if A*C<= B:
    print (C)
else:
    print (int(B/A))
def main():
  array = []
  array = raw_input().split(' ')
  
  if sum(array) >= 22:
    print('bust')
  else:
    print('win')

if __name__ == '__main__':
  main()
  

### FIXED CODE ###

#/usr/bin/env python3
def main():
  array = []
  array = list(map(int, input().split(' ')))
  
  if sum(array) >= 22:
    print('bust')
  else:
    print('win')

if __name__ == '__main__':
  main()
n = int(input())
a = list(map(int, input().split()))
l = []
for i in a:
    count = 0
    for j in range(1, 11):
        if i%(2**j) == 0:
            count += 1
        else:
            l.append(count)
            break
print(min(l))

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
l = []
for i in a:
    count = 0
    for j in range(1, 31):
        if i%(2**j) == 0:
            count += 1
        else:
            l.append(count)
            break
print(min(l))
W, H, x, y, r = map(int, input().split()))
  if x - r > 0 and x + r < W:
    if y - r > 0 and y + r < H:
      print(Yes)
  else:
    print(No)

### FIXED CODE ###

W, H, x, y, r = map(int, input().split())
if r <= x <= W - r and r <= y <= H - r:
  print("Yes")
else:
  print("No")
n,k = map(int, input().split())
li = []
for i in range(k):
  li.append(int(input()))
else:
  Li = list(n)
  while not len(set(li)&set(Li)):
    n += 1
    Li = list(n)
  else: print("".join(Li))

### FIXED CODE ###

n,k = map(str, input().split())
li = list(map(str, input().split()))
Li = list(n)
while len(set(Li)&set(li)):
  n = int(n)+1
  Li = list(str(n))
else: print("".join(Li))
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a1 = na()
a2 = na()
a3 = na()

A = a1+a2+a3
C = [0,0,0,0,0,0,0,0,0]

n = ni()

for i in range(n):
    b = ni()
    if b in A:
        C[A.index(b)] = 1
    if sum(C[0:3]) == 3 or sum(C[3:6])==3 or sum(C[6:9]) == 3 or sum(C[::4]) == 3 or sum(C[2:7:2]) == 3 or sum(C[0::3]) == 3 or sum(C[1::3]) == 3 or sum(C[2::3]) == 3:
        print('Yes')
        exit()

print("No")

### FIXED CODE ###

import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n = ni()
print((n+1)//2)
N = int(input())
a = list(map(int,input().split()))
l = []

import sys
for i in range(N-1):
    l.append(a[i+1]-a[i])
if any(i<=-2 for i in l):
    print("No")
for i in range(N-1):
    total = l[i]
    for k in range(1,N-1):
        if total <　0:
            total += l[k]
            if k == N-2:
                print("No")
                sys.exit()
        else:
            break
print("Yes")


### FIXED CODE ###

N = int(input())
a = list(map(int,input().split()))
l = []
for i in range(N-1):
    if a[i+1]-a[i] != 0:
        l.append(a[i+1]-a[i])
# print(l)
if any(i<=-2 for i in l):
    print("No")
    exit()
# while 0 in l:
#     l.remove(0)
# # print(l)
for i in range(len(l)-1):
    if l[i] == -1 and l[i+1] == -1:
        print("No")
        exit()
print("Yes")
N=int(input())
S=input()
if N%2==0:
    print('No')
for i in range(N/2):
    if S[i]!=S[N/2+i]:
        print('No')
        exit()
print('Yes')

### FIXED CODE ###

N=int(input())
S=input()
if N%2!=0:
    print('No')
    exit()
for i in range(int(N/2)):
    if S[i]!=S[int(N/2)+i]:
        print('No')
        exit()
print('Yes')
r,D,x=map(int,input().split())
for i in range(10):
   x=r*x-D
    print(x)

### FIXED CODE ###

r,D,x=map(int,input().split())
for i in range(10):
  x=r*x-D
  print(x)
import queue

n,m = map(int,input().split())
hen = [[] for i in range(m)]
ans = [0 for i in range(n)]
a,b = 0,0
max = 0

for i in range(m):
    a,b = map(int,input().split())
    hen[a-1].append(b)
    hen[b-1].append(a)

q = queue.Queue()
q.put(1)

while q.empty() == False:
    head = q.get()
    for h in hen[head-1]:
        if h != 1 and ans[h-1] == 0:
            ans[h-1] = head
            q.put(h)

flag = 0

for i in range(n):
    if i != 0 and ans[i] == 0:
        flag = 1

if flag == 0:
    print('Yes')
    for i in range(max-1):
        print(ans[i+1])
else:
    print('No')


### FIXED CODE ###

import queue

n,m = map(int,input().split())
hen = [[] for i in range(n)]
ans = [0 for i in range(n)]
a,b = 0,0



for i in range(m):
    a,b = map(int,input().split())
    hen[a-1].append(b)
    hen[b-1].append(a)

q = queue.Queue()
q.put(1)

while q.empty() == False:
    head = q.get()
    for h in hen[head-1]:
        if h != 1 and ans[h-1] == 0:
            ans[h-1] = head
            q.put(h)

flag = 0

for i in range(n):
    if i != 0 and ans[i] == 0:
        flag = 1

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

for i in range(a):
     for j in range(b):
          print('#')
          return
     print(/n)


### FIXED CODE ###

while True:
    a,b=map(int,input().split())
    if a==0 and b==0:break
    for i in range (a):
        print('#'*b)
    print()
#!/usr/bin/env python3
import sys


def Print(array):
    for r in range(len(array)):
        print(array[r])
    print()


def Gauss(array):
    for r in range(len(array)):
        array[r].append(r)      # 繝斐?繝?ヨ驕ク謚槭＠縺溷セ? 譛?セ後↓謌サ縺吶◆繧√?繝槭?繧ォ繝シ

    for r in range(len(array)):  # 蜑埼?豸亥悉
        array.sort(key=lambda x: x[r], reverse=True)  # 繝斐?繝?ヨ
        div = array[r][r]
        for c in range(r, len(array) + 1):  # 迴セ蝨ィ縺ョ陦後?蜈磯?縺?縺ォ縺ェ繧九ｈ縺?↓蜑イ繧?            array[r][c] /= div
        for r2 in range(r + 1, len(array)):      # 迴セ蝨ィ縺ョ陦後ｈ繧贋ク九?陦後?蜈磯?繧?縺ォ縺吶ｋ
            head = array[r2][r]
            for c in range(r, len(array) + 1):
                array[r2][c] -= head * array[r][c]

    result = [0] * len(array)
    for r in range(len(array) - 1, -1, -1):  # 蠕碁?莉」蜈・
        result[r] = array[r][
            len(array)] - sum([result[x] * array[r][x] for x in range(r + 1, len(array))])
    return result


for line in sys.stdin:
    [a, b, c, d, e, f] = [int(x) for x in line.split()]
    result = Gauss([[a, b, c], [d, e, f]])
    for i in range(len(result) - 1):
        print("{0:.3f}".format(result[i]), end=" ")
    print("{0:.3f}".format(result[-1]))

### FIXED CODE ###

#!/usr/bin/env python3
import sys


def Print(array):
    for r in range(len(array)):
        print(array[r])
    print()


def Gauss(array):
    # for r in range(len(array)):
    #     array[r].append(r)

    for r in range(len(array)):
        # array.sort(key=lambda x: x[r], reverse=True)
        div = array[r][r]
        for c in range(r, len(array) + 1):
            array[r][c] /= div
        for r2 in range(r + 1, len(array)):
            head = array[r2][r]
            for c in range(r, len(array) + 1):
                array[r2][c] -= head * array[r][c]

    result = [0] * len(array)
    for r in range(len(array) - 1, -1, -1):
        result[r] = array[r][
            len(array)] - sum([result[x] * array[r][x] for x in range(r + 1, len(array))])
    return result


for line in sys.stdin:
    [a, b, c, d, e, f] = [int(x) for x in line.split()]
    result = Gauss([[a, b, c], [d, e, f]])
    for i in range(len(result) - 1):
        print("{0:.3f}".format(result[i]), end=" ")
    print("{0:.3f}".format(result[-1]))
n=int(input())
a=list(map(int,input().split()))
ans=0
m=sum(a)
leaf=1
for i in range(n+1):
    ans+=leaf
    leaf=leaf-a[i]
    m-=a[i]

    if leaf<0 or (leaf==0 and m>0): print(-1);sys.exit()
    tmp=leaf
    for j in range(min(n-i,50)):
        tmp*=2
        if tmp>=m: break
    if tmp<m: print(-1);sys.exit()        
    if leaf*2>=m: leaf=m
    else: leaf*=2
print(ans)

### FIXED CODE ###

import sys
n=int(input())
a=list(map(int,input().split()))
ans=0
m=sum(a)
leaf=1
for i in range(n+1):
    ans+=leaf
    leaf=leaf-a[i]
    m-=a[i]

    if leaf<0 or (leaf==0 and m>0):
        print(-1)
        sys.exit()

    tmp=leaf
    for j in range(min(n-i,60)):
        tmp*=2
        if tmp>=m: break
    if tmp<m:
        print(-1)
        sys.exit()        

    if leaf*2>=m: leaf=m
    else: leaf*=2

print(ans)
import fractions as f
g=f.gcd(map(int,input().split()));print(-1if input()[::n//g]!=input()[::m//g]else n*m//g)

### FIXED CODE ###

from fractions import gcd

n,m = map(int,input().split())
s = input()
t = input()
if n==m:
    if s!=t:
        print('-1')
        exit()
    else:
        print(n)
        exit()
elif n<m:
    n,m = m,n
    s,t = t,s
# n>m
if n%m==0:
    k = n//m
    if s[::k]==t:
        print(n)
        exit()
    else:
        print('-1')
        exit()
else:
    g = gcd(n,m)
    if s[::n//g]==t[::m//g]:
        print(n*m//gcd(n,m))
    else:
        print(-1)
n = int(input())

for i in range(1, 10):
  for j in range(1, 10):
    if i*j == n:
      print('Yes')
      return

print('No')

### FIXED CODE ###

N=int(input())
f=0
for i in range(1,10):
    for j in range(1,10):
        if N==i*j:
            f=1
            break
    if f==1:
        break
if f==0:
    print("No")
else:
    print("Yes")
while True:
  H, W = map(int, input().split())
  if H == W == 0: break
  print('#' * W + '\n' + trye('#' + '.' * (W - 2) + '#' + '\n') * (H - 2) + '#' * W)

### FIXED CODE ###

while True:
  H, W = map(int, input().split())
  if H == W == 0: break
  print('#' * W + '\n' + ('#' + '.' * (W - 2) + '#' + '\n') * (H - 2) + '#' * W + '\n')
n, X = map(int, input().split())
 
for i in range(n+1):
  for j in range(n+1):
    if i+j > n:
      pass
    else:
      k = n-i-j
      otoshi = 10000*i + 5000*j + 1000*k
      if otoshi == X:
        print(i, j, k)
        break
  else:
    continue
  break

### FIXED CODE ###

n = int(input())
s = {input() for i in range(n)}
 
print(len(s))
N = int(input())
lis_h = list(map(int, input().split()))

for i in range(N,1,-1):
    if lis_h[i - 1] < lis_h[i - 2]:
        lis_h[i - 2] -= 1
        if lis_h[i - 1] < lis_h[i - 2]:
            print("No")
            exit()
print("Yes")

### FIXED CODE ###

lis = list(map(int, input().split()))

if lis[2] - (lis[0] - lis[1]) > 0:
    print(lis[2] - (lis[0] - lis[1]))
else:
    print(0)
N,Q=map(int,input().split())
par=[i for i in range(N+1)]
def find(x):
    if par[x] ==x:
        return x
    else:
        par[x] = find(par[x])
        return par[x]
def same(x,y):
    return find(x) == find(y)
def unite(x,y):
    x = find(x)
    y = find(y)
    if x == y:
        return 0
    par[x]=y
for i in range(Q):
    a,b=map(int,input().split())
    unite(a,b)
ans=dict()
for i in par:
    tmp=find(i)
    if tmp in ans:
        ans[tmp]+=1
    else:
        ans[tmp]=1
print(max(ans.values()))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)

N,Q=map(int,input().split())
par=[i for i in range(N+1)]
def find(x):
    if par[x] ==x:
        return x
    else:
        par[x] = find(par[x])
        return par[x]
def same(x,y):
    return find(x) == find(y)
def unite(x,y):
    x = find(x)
    y = find(y)
    if x == y:
        return 0
    par[x]=y
for i in range(Q):
    a,b=map(int,input().split())
    unite(a,b)
ans=dict()
for i in par:
    tmp=find(i)
    if tmp in ans:
        ans[tmp]+=1
    else:
        ans[tmp]=1
print(max(ans.values()))
INF = 10 ** 9 + 7
N, W = map(int, input().split())
weight = []
value = []
for i in range(N):
    tempW, tempV = map(int, input().split())
    weight.append(tempW)
    value.append(tempV)

dp = [[INF for _ in range(N * 300)] for _ in range(N)]
for i in range(value[0]):
    dp[0][i] = weight[0]

for i in range(N):
    for l in range(N * 300):
        if l - value[i] >= 0:
            dp[i][l] = min(dp[i - 1][l], dp[i - 1][l - value[i]] + weight[i])
        else:
            dp[i][l] = min(weight[i], dp[i - 1][l])
for i in range(N * 300 - 1):
    if dp[-1][i] <= W < dp[-1][i + 1]:
        print(i + 1)
        break
    elif i == N * 300 - 2:
        print(N * 300)


### FIXED CODE ###

import sys
import math
from collections import deque
import copy

INF = 10 ** 9 + 7
N, W = map(int, input().split())
weight = []
value = []
for i in range(N):
    tempW, tempV = map(int, input().split())
    weight.append(tempW)
    value.append(tempV)

dp = [[INF for _ in range(N * 1000 + 1)] for _ in range(N + 1)]
dp[0][0] = 0

for i in range(1, N + 1):
    for l in range(N * 1000 + 1):
        if l - value[i - 1] >= 0:
            dp[i][l] = min(dp[i - 1][l], dp[i - 1][l - value[i - 1]] + weight[i - 1])
        else:
            dp[i][l] = dp[i - 1][l]
for i in range(N * 1000 + 1):
    if dp[N][i] <= W:
        ans = i
print(ans)
def update(v):
    for nv in con[v]:
        if seen[nv]:
            continue
        seen[nv]=1
        update(nv)

N,M=map(int,input().split())
seen=[0]*N
con=[[] for i in range(N)]
cnt=[[i,0] for i in range(N)]
for i in range(M):
    X,Y,Z=map(int,input().split())
    X,Y=X-1,Y-1
    con[X].append(Y)
    con[Y].append(X)
    cnt[X][1]+=1
    cnt[Y][1]+=1
cnt.sort(key=lambda x:x[1],reverse=True)
ans=0
for i,a in cnt:
    if(seen[i]):
        continue
    ans+=1
    seen[i]=1
    update(i)
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)

def update(v):
    for nv in con[v]:
        if seen[nv]:
            continue
        seen[nv]=1
        update(nv)

N,M=map(int,input().split())
seen=[0]*N
con=[[] for i in range(N)]
cnt=[[i,0] for i in range(N)]
for i in range(M):
    X,Y,Z=map(int,input().split())
    X,Y=X-1,Y-1
    con[X].append(Y)
    con[Y].append(X)
    cnt[X][1]+=1
    cnt[Y][1]+=1
cnt.sort(key=lambda x:x[1],reverse=True)
ans=0
for i,a in cnt:
    if(seen[i]):
        continue
    ans+=1
    seen[i]=1
    update(i)
print(ans)
N, K = map(int, input().split())
setlist = set()
tmp = N
ans = float('inf')
while True:
  tmp = abs(N-K)
  ans = min(tmp,ans)
  if tmp in setlist:
    break
  setlist.add(tmp)
return ans

### FIXED CODE ###

def main():
  N, K = map(int,input().split())
  print(min(N%K, K-N%K))
  return 
main()
print("A{}C".format("B"if int(input())<1200else"R"))

### FIXED CODE ###

a,s,d,f=map(int,input().split());print(max(a*s,d*f))