peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
N,x = map(int,input().split())
A = sorted(list(map(int,input().split())))
if x>=2*sum(A):
    print(0)
else:
    ind = N
    for i in range(N):
        x -= A[i]
        if x<0:
            ind = i
            break
    if ind==N and x>0:
        A = sorted(A,reverse=True)
        for i in range(N):
            x -= A[i]
            if x<0:
                ind -= 1
                break
    print(ind)
# Judge status: Accepted
n = int(input())
*a, = map(int, input().split())
tot = sum(a)

ret = tot
l, r = 0, tot
for i in range(n):
    l += a[i]
    r -= a[i]
    ret = min(ret, abs(l - r))
print(ret)
# Judge status: Accepted
n = int(input())

a = [int(x) for x in input().split()]

count = 0

for i in range(n):
    if i%2 == 0 and a[i]%2 == 1:
        count += 1

print(count)
# Judge status: Accepted
K,A,B=map(int, input().split())
if A+2>=B:
  print(K+1)
else:
  if K==1 or K<=A:
    print(K+1)
  else:
    cnt=0
    K-=(A-1)
    a=K//2
    cnt=a*(B-A)+A
    if K%2==1:
      cnt+=1
    print(cnt)
# Judge status: Wrong Answer
x = int(input())
a = 100
year = 0
while(True):
    a *= 1.01
    year += 1
    if a>=x:
        break
print(year)
# Judge status: Wrong Answer
n,k=map(int,input().split())
a=list(map(int,input().split()))
from collections import defaultdict
d=defaultdict(int)
for i in a:
  d[i]+=1
print(sum(sorted(list(d.values()))[:n-k]))
# Judge status: Wrong Answer
L=int(input("Enter L:"))
V=(L*L*L)/27
print(V)
# Judge status: Accepted
X=int(input())

ans=100
now=100
cnt=0
while(True):
  if X<=now:
    break
  else:
    now=int(now+now*0.01)
    cnt+=1
print(cnt)
# Judge status: Accepted
import math
A, B, C, D = input().split(' ')

takahasi_tairyoku = int(A)
aoki_tairyoku = int(C)

takahasi_kougeki = int(B)
aoki_kougeki = int(D)

takahasi_count = math.ceil(aoki_tairyoku / takahasi_kougeki) # 高橋はアオキを何回で倒せるか
aoki_count = math.ceil(takahasi_tairyoku / aoki_kougeki) # アオキは高橋を何回で倒せるか
# print(takahasi_count, aoki_count)
if (takahasi_count <= aoki_count):
  print('Yes')
else:
  print('No')
# Judge status: Accepted
from collections import Counter

N = int(input())
A = [int(input()) for i in range(N)]

c = Counter(A)

ans = 0
for i, j in c.items():
    if j%2 != 0:
        ans += 1

print(ans)
# Judge status: Accepted
n = int(input())

ans = False
for c in range(101):
    for d in range(101):
        if (4 * c) + (7 * d) == n:
            ans = True
            break

if ans:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
D = int(input())
print('Christmas' + ' Eve'*(25-D))
# Judge status: Accepted
import math
N=int(input())

X_kari = math.ceil(N/1.08)
if int(X_kari * 1.08) == N:
  print(X_kari)
else: print(':(')
# Judge status: Wrong Answer
a=int(input(""))
b=int(input(""))
c=int(input(""))
x=int(input(""))
def countcourse(r,t,y,u):
    cnt=0
    for h in range(r):
        for l in range(t):
            for o in range(y):
                if 500*h+100*l+50*o==u:
                    cnt+=1
    return cnt
print(countcourse(a,b,c,x))
# Judge status: Wrong Answer
A,B,C = map(int,input().split())
cmin = ((A+1)//2-A//2)*B*C
cmin = min(cmin,((B+1)//2-B//2)*A*C)
Cmin = min(cmin,((C+1)//2-C//2)*B*A)
print(cmin)
# Judge status: Wrong Answer
A, B = list(map(int, input().split()))

print(A * B)
# Judge status: Wrong Answer
def main():
    N = int(input())
    A = list(map(int, input().split()))

    Asum = sum(A)
    ans = 10**10
    for i in range(N):
        if Asum % A[i] == 0:
            ans = min(ans, A[i])
        else:
            ans = min(ans, Asum % A[i])
    print(ans)


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
a, b = map(int, input().split())
if a < 10 and b < 10:
  print('a * b')
else:
  print('-1')
# Judge status: Wrong Answer
S=input()
Q=int(input())
F=0
C=''
while Q>=1:
  tfc=list(input().split())
  if int(tfc[0])==1:
    box1=S[0]
    box2=S[-1]
    S=box2+S[1:-1]+box1
  elif int(tfc[0])==2:
    if int(tfc[1])==1:
      S=tfc[2]+S
    elif int(tfc[1])==2:
      S=S+tfc[2]
  Q-=1
ans=''.join(S)
print(ans)
# Judge status: Accepted
def f(x):
    a = 0
    while x != 0:
        a += x % 10
        x //= 10
    return a

N = int(input())

Min = 1 + f(N-1)
for i in range((N//2)-1):
    Min = min(Min, f(i+2) + f(N-i-2))

print(Min)
# Judge status: Wrong Answer
A,B,M = [int(i) for i in input().split()]
A = sorted([int(i) for i in input().split()])
B = sorted([int(i) for i in input().split()])
min = 99999999999
for i in range(M):
  x,y,c = [int(i) for i in input().split()]
  buf = A[x-1]+B[y-1]-c
  if buf<min:
    min = buf
print(buf)
# Judge status: Accepted
n, a, b = map(int, input().split())
mx = a+b*(n-1)
mn = a*(n-1)+b
if ((n==1)and(a!=b)) or (mx-mn<0):
    r = 0
else:
    r = mx-mn+1
print(r)
# Judge status: Accepted
n=int(input())
li=[None]*n
for i in range(0,n):
    flag=True
    x,l=map(int, input().split())
    li[i]=(x+l, x-l)
li=sorted(li)
count=1
x,y=li[0]
for i in range(1,n):
    x2,y2=li[i]
    if y2 < x:
        continue
    count=count+1
    x=x2
print(count)
# Judge status: Accepted
n = int(input())
string = input()

x = 0

out =  [0]

for s in string:
    if s == "I":
        x += 1
    else:
        x -= 1
    out.append(x)

print(max(out))
# Judge status: Wrong Answer
import bisect

n,m,k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

A_cum = [0]
B_cum = [0]

for i in range(n):
  A_cum.append(A_cum[i]+A[i])
  
for i in range(m):
  B_cum.append(B_cum[i]+B[i])

ans = 0  
for i in range(n+1):
  rest = k-A_cum[i]
  if rest<=0:
    continue
  
  ans = max(ans, bisect.bisect_right(B_cum, rest)-1+i)
  
print(ans)
# Judge status: Accepted
a,b = map(int,input().split())
if a>0 and b>0:
  print('Positive')
elif a <0 and b<0:
  if (a-b)%2 ==0:
    print('Negative')
  else:
    print('Positive')
else:
  print('Zero')
# Judge status: Accepted
#AGC040-A
s = list(input())
 
ans = [0 for _ in range(len(s)+1)]
 
for i in range(len(s)):
    if s[i] == '<':
        ans[i+1] = ans[i]+1

for j in range(len(s)-1,-1,-1):
    if s[j] == '>':
        tmp = ans[j+1] + 1
        if tmp > ans[j]:
            ans[j] = tmp
                
print(sum(ans))
# Judge status: Accepted
a,b=map(int,input().split())
if a>b :
  print(a-1)
else :
  print(a)
# Judge status: Accepted
a, b = map(int, input().split())
length = 0
for i in range(1, b-a+1):
  length += i
print(length - b)
# Judge status: Accepted
a, b, k = map(int, input().split())
ca = a-k
if ca >= 0:
    print(ca, b)
else:
    cb = b + ca
    if cb < 0:
        print(0, 0)
    else:
        print(0, cb)
# Judge status: Accepted
a,b,n = map(int,input().split())

ans =0

# for x in range(1,n+1):
x = min(b-1,n)
ans = max( ans , (a * x) // b - a* (x // b))
print(ans)
# Judge status: Accepted
MOD=998244353
from collections import Counter
N=int(input())
D=list(map(int,input().split()))
if D[0]!=0:
    print(0)
    exit()
c=sorted(Counter(D[1:]).most_common(),key=lambda x:x[0])
ans=1
for i in range(1,len(c)):
    if(c[i][0]!=i+1):
        print(0)
        exit()
    ans=(ans*pow(c[i-1][1],c[i][1],MOD))%MOD
print(ans)
# Judge status: Accepted
def main():
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())
    dis = abs(B - A)
    if W >= V:
        print('NO')
        exit()
    dis_V = V - W
    time = dis // dis_V if dis % dis_V == 0 else (dis // dis_V) + 1
    
    if T >= time:
        print('YES')
    else:
        print('NO')



if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
import fractions

a,b,c,d = map(int, input().split())
#print(a,b,c,d)
total = b-a+1
#print(total)
lcm = c*d / fractions.gcd(c,d)
x = (b//c) + (b//d) - (b//lcm)
y = ((a-1)//c) + ((a-1)//d) - ((a-1)//lcm)
#print(x,y)
print(total - (x - y))
# Judge status: Accepted
import math
n,x,t = map(int,input().split())
ans = t*math.ceil(n/x)
print(ans)
# Judge status: Accepted
N,M = map(int, input().split())
s,p = [False]*N, [0]*N
for i in range(M):
  tmp = input().split()
  pi,Si = int(tmp[0])-1, tmp[1]
  s[pi] |= Si == "AC"
  p[pi] += 1 if not s[pi] else 0
print(sum(s), sum([pi for si,pi in zip(s,p) if si]))
# Judge status: Accepted
n = int(input())
input_lines = [[int(j) for j in input().split()]for i in range(2)]

ans=0
for i in range(n):
    tmp = sum(input_lines[0][:i+1])+sum(input_lines[1][i:])
    if tmp>ans:
        ans=tmp
print(ans)
# Judge status: Accepted
def get_ints():
    return list(map(int, input().split()))

n = int(input())
a,b = [],[]
for i in range(n):
    x, y = get_ints()
    a.append(x+y)
    b.append(x-y)

a.sort()
b.sort()
ans = max(a[-1]-a[0], b[-1]-b[0])
print(ans)
# Judge status: Accepted
N = int(input())

counts = [0 for i in range(N+1)]

for i in range(1,150):
    for j in range(1,150):
        for k in range(1,150):
            now = i**2 + j**2 + k**2 + i*j + j*k + k*i
            try:
                counts[now] += 1
            except:
                pass
for i in range(1,N+1):
    print(counts[i])
# Judge status: Accepted
a,b,c = map(int,input().split())

print(max(0,c-(a-b)))
# Judge status: Wrong Answer
l=list(str(input()))
m=len(l)
t=0
for i in range(m):
    if int(l[i])<=5:
        t+=int(l[i])
    else:
        t+=11-int(l[i])
print(t)
# Judge status: Accepted
#!/usr/bin/env python3

A, B, C, K = map(int, input().split())
if K <= A:
    print(K)
elif K <= (A+B):
    print(A)
else:
    print(2*A-K+B)
# Judge status: Wrong Answer
#!/usr/bin/env python3


def main():
    N, L = map(int, input().split())
    if L >= 1:
        # L + 1 から L + N - 1 の和
        print((N - 1) * (2 * L + N) // 2)
    elif L <= - N + 1:
        # L から L + N - 2 の和
        print((N - 1) * (2 * L + N - 2) // 2)
    else:
        # L から L + N - 1 の和
        print((N - 1) * (2 * L + N - 1) // 2)


if __name__ == '__main__':
    main()
# Judge status: Accepted
def main():
  N,M = map(int,input().split())
  ans = 0
  if 2*N >= M:
    ans = M//2
  else:
    ans += N
    M -= N*2
    ans += M//4
  print(ans)
  
main()
# Judge status: Accepted
A, B, C, K = map(int, input().split())
if A >= K:
    print(K)
elif A+B >= K:
    print(A)
else:
    print(A - (K-A-B))
# Judge status: Accepted
n, m = [int(i) for i in input().split()]
print(abs((n - 2) * (m - 2)))
# Judge status: Wrong Answer
n,d=map(int,input().split())
for i in range(n):
    if i*((d-1)*2+3)>=n:
        print(i)
        exit()
# Judge status: Accepted
a,b,t=map(int,input().split())
print(((t+1//2)//a)*b)
# Judge status: Accepted
n,k=map(int,input().split())
amari=n%k
print(min(amari,k-amari))
# Judge status: Accepted
N=int(input())
print(800*N-(int(N/15)*200))
# Judge status: Accepted
from bisect import bisect_left, bisect_right
import sys
input = sys.stdin.readline

n = int(input())
col_maxs = []
for _ in range(n):
    a = int(input()) * (-1)
    if not col_maxs:
        col_maxs.append(a)
        continue

    curr_max = col_maxs[-1]
    if a >= curr_max:
        col_maxs.append(a)
    else:
        # aより大きい最小要素のindex/value
        ind = bisect_right(col_maxs, a)
        col_maxs[ind] = a

print(len(col_maxs))
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
na = [0]*n
for i in range(n):
    na[i] = a[i]-(i+1)
mid = sum(na)//n
mid1 = mid+1
ans = 0
ans1 = 0
for i in range(n):
    ans += abs(na[i]-mid)
    ans1 += abs(na[i]+mid1)
print(min(ans, ans1))
# Judge status: Accepted
C=[list(map(int,input().split())) for _ in range(3)]
x=[0]*3
y=[0]*3
x[0]=0
y[0]=0

for i in range(3):
    y[i]=C[0][i]-x[0]
for i in range(3):
    x[i]=C[i][0]-y[0]
    
ans=True
for i in range(3):
    for j in range(3):
        if C[i][j]!=x[i]+y[j]: ans=False
print('Yes' if ans else 'No')
# Judge status: Accepted
m=int(1e9+7)
n=int(input())
ans=pow(10,n,m)-2*pow(9,n,m)+pow(8,n,m)
print(ans%m)
# Judge status: Accepted
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
import copy
B = copy.deepcopy(A)
A = sorted(A)
for i in range(N):
    num = B[i]
    if num != A[-1]:
        print(A[-1])
    else:
        print(A[-2])
# Judge status: Accepted
n = int(input())
S = {}
for i in range(n):
    s = str(input())
    if s not in S:
        S[s] = 1
    else:
        S[s] += 1
m = int(input())
T = {}
for i in range(m):
    t = str(input())
    if t not in T:
        T[t] = 1
    else:
        T[t] += 1

ans = 0
for k, v in S.items():
    if k in T:
        ans = max(ans, v-T[k])
    else:
        ans = max(ans, v)
print(ans)
# Judge status: Wrong Answer
import math
n = int(input())

def factors(a):
    b = int(math.sqrt(a))
    f = []
    for i in range(1, b+1):
        if a % i == 0:
            f.append(i)
            f.append(a//i)
    return len(f)

def solve():
    if n < 105:
        print(0)
        return
    ans = 0
    for i in range(105, n+1):
        if factors(i) == 8:
           ans += 1
    print(ans)
solve()
# Judge status: Wrong Answer
n,l=map(int,input().split())
S=[]
a=""
for i in range(n):
  s=list(input())
  s.sort()
  for k in range(l):
    a+=s[k]
  S.append(a)
  a=""
S.sort()
ans=""
for j in range(n):
  ans+=S[j]
print(ans)
# Judge status: Wrong Answer
n,m=map(int,input().split())
A=[[0,0]for i in range(n)]
B=[[0,0] for i in range(m)]
E=[1]*n
for i in range(n):
    A[i][0],A[i][1]=map(int,input().split())
for i in range(m):
    B[i][0],B[i][1]=map(int,input().split())
for i in range(n):
    c=abs(A[i][0]-B[0][0])+abs(A[i][1]-B[0][1])
    for j in range(1,m):
        if abs(A[i][0]-B[j][0])+abs(A[i][1]-B[j][1])<c:
            E[i]=j+1
for i in range(n):
    print(E[i])
# Judge status: Wrong Answer
import sys
N=int(input())
for i in range(N):
    if i**2>N:
        print((i-1)**2)
        sys.exit()
    else:
        pass
# Judge status: Accepted
a = int(input())
b = int(input())
h = int(input())
 
print(int((a+b)*h/2))
# Judge status: Wrong Answer
n=str(input())
a=n[-1]
if a=='2' or n=='4' or a=='5' or a=='7' or a=='9':
    print('hon')
elif a=='3':
    print('bon')
elif n==0:
    print('hon')
else:
    print('pon')
# Judge status: Accepted
from collections import deque

K = int(input())
que = deque()
for i in range(1, 10):
    que.append(i)
count = 0
while 1:
    count += 1
    x = que.popleft()
    for i in range(-1, 2):
        d = x % 10 + i
        if (d < 0 or 9 < d):
            continue
        que.append(x * 10 + d)
    if (count == K):
        print(x)
        break
# Judge status: Accepted
#

import sys
input=sys.stdin.readline

def main():
    N=int(input())
    cnt=[0]*(8*N)
    r=int(N**0.5)+1
    for x in range(1,r):
        for y in range(1,r):
            for z in range(1,r):
                cnt[x*x+y*y+z*z+x*y+y*z+z*x]+=1
                
    for i in range(1,N+1):
        print(cnt[i])
    
    
if __name__=="__main__":
    main()
# Judge status: Accepted
n=int(input())
print(n*(n-1)//2)
# Judge status: Accepted
import sys
import math
import numpy as np
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n, d = na()
x = [[] for _ in range(n)]
for i in range(n):
    x[i] = na()
x = np.array(x)
c = 0
for i in range(n):
    for j in range(i+1, n):
        s = (np.sum((x[i] - x[j])**2))**0.5
        if s.is_integer():
            c += 1
print(c)
# Judge status: Accepted
S=input()
T=input()
print('Yes' if T in S+S else 'No')
# Judge status: Accepted
n = int(input())
counter = 0
for i in range(1, n+1, 2):
    divisor_counter = 0
    for j in range(1, i+1):
        if i % j == 0:
            divisor_counter += 1

    if divisor_counter == 8:
        counter += 1
print(counter)
# Judge status: Accepted
import numpy
N, K = map(int, input().split())
p = list(map(int, input().split()))

lis = list()

p = [(i + 1)/2 for i in p ]
numpy.set_printoptions(precision=16)

cumSum = numpy.cumsum(p)

cumSum2 = list(cumSum)

cumSum2.insert(0,0)

for i in range(0, N-K+1):
    lis.append(cumSum2[K+i] - cumSum2[i])

print('{:.12f}'.format(max(lis)))
# Judge status: Wrong Answer
N, K = input().split();
N = int(N);
K = int(K);

amari = N % K;

hu = -1* (amari - K);

max_N = max(amari,hu);

print(max_N);
# Judge status: Accepted
x = int(input())
s, r = divmod(x, 11)
s *= 2
if r > 6:
    s += 2
elif 1 <= r <= 6:
    s += 1
print(s)
# Judge status: Wrong Answer
N, a, b = map( int, input().split())
mod = 10 ** 9 + 7

def nCr( n, r ):
  f = 1
  inv = 1
  for i in range( 1, min( n - r, r ) + 1 ):
    f = f * ( n - i + 1 ) % mod
    inv = inv * i % mod
  return f * pow( inv, mod - 2, mod ) % mod

A = nCr( N, a )
B = nCr( N, b )
N = pow( 2, N, mod )
print( ( N - A - B ) % mod )
# Judge status: Accepted
N, M = map(int, input().split())

ans = [-1] * N

for _ in range(M):
    s, i = map(int, input().split())
    s -= 1
    if ans[s] != -1 and ans[s] != i:
        print(-1)
        exit()
    ans[s] = i

if N > 1 and ans[0] == -1:
    ans[0] = 1

for i in range(N):
    if ans[i] == -1:
        ans[i] = 0

ans = int(''.join(map(str, ans)))

if len(str(ans)) != N:
    print(-1)
    exit()

print(ans)
# Judge status: Accepted
c = input()
print(chr(ord(c)+1))
# Judge status: Wrong Answer
a,b,c = map(int, input().split())

if (a+b+c) % 3 == 0:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
k,n = map(int, input().split())
a = list(map(int, input().split()))

b = [a[0]+k-a[-1]]
for i in range(1,n):
    b.append(a[i]-a[i-1])
print(k-max(b))
# Judge status: Accepted
# B - Easy Linear Programming

a, b, c, k = map(int, input().split())
print(min(k, a, a + a + b - k))
# Judge status: Wrong Answer
n = int(input())
ans = int(n*100/108+0.5)
if int(ans*1.08)==n:
    print(ans)
else:
    print(":(")
# Judge status: Accepted
S = int(input())
p = [0 for _ in range(max(4,S + 1))]
p[3] = 1
for i in range(4,S + 1):
    p[i] += 1
    for j in range(1,i-2):
        p[i] += p[j]
        p[i] %= 10 ** 9+ 7
print(p[S])
# Judge status: Accepted
import sys
import math
import bisect
input = sys.stdin.readline
MOD = 10**9 + 7
INF = float('INF')

def main():
    n, k, q = list(map(int,input().split()))
    t = q - k + 1
    p = [0] * n

    for i in range(q):
        a = int(input())
        p[a-1] += 1

    for i in range(n):
        if p[i] >= t:
            print('Yes')
        else:
            print('No')

if __name__ == '__main__':
    main()
# Judge status: Accepted
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

n,w = map(int,readline().split())
WV = []
for i in range(n):
	WV.append(list(map(int,readline().split())))

dp = [[0]*(w+1) for _ in range(n+1)]

for i in range(n):
	for j in range(w+1):
		if WV[i][0]-j > 0:
			dp[i+1][j] = dp[i][j]
			continue
		dp[i+1][j] = max(dp[i][j],dp[i][j-WV[i][0]]+WV[i][1])

print(dp[-1][-1])
# Judge status: Accepted
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())


if a > b:
  av = a - (v * t)
  bw = b - (w * t)
  if av <= bw:
    print('YES')
  else:
    print('NO')

elif a < b:
  av = a + (v * t)
  bw = b + (w * t)
  if av >= bw:
    print('YES')
  else:
    print('NO')
# Judge status: Accepted
import itertools

from math import sqrt


def actual(n, d, X):
    count = 0

    for p1, p2 in itertools.combinations(X, 2):
        d_float = sqrt(sum([(y - z) ** 2 for (y, z) in zip(p1, p2)]))

        if d_float % 1 == 0.0:
            count += 1

    return count

n, d = map(int, input().split())
X = []
for _ in range(n):
	X.append(list(map(int, input().split())))

print(actual(n, d, X))
# Judge status: Wrong Answer
X=int(input())
B=0
X=X-100
for i in range(0,X):
    X=X-1
    B=B+1
    
print(B)
# Judge status: Wrong Answer
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = 0
count = 0
i = 1
while d <= x and i <= n:
    d = d + l[i - 1]
    count += 1
    i += 1
if d < x:
    count += 1

print(count)
# Judge status: Wrong Answer
from math import sqrt
a, b, c = map(int, input().split())
x = (c - b) / (sqrt(c) + sqrt(b))
y = (x ** 2 - a) / (x + sqrt(a))
if 0 < y:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
N = int(input())
S = input()
max_w = S.count(".")
if max_w == 0 or max_w == N:
  print(0)
  exit()

ans = float("inf")
b, w = 0, max_w
for s in S:
  if s == "#":
    b += 1
  else:
    w -= 1
  ans = min(ans, b+w)
print(min(ans, max_w, N-max_w))
# Judge status: Accepted
N = int(input())
S = input()

ANS = ""

for MOJI in S:
  i = ord(MOJI) + N
  if i > 90:
    i = i - 26
  ANS = ANS + chr(i)

print(ANS)
# Judge status: Accepted
W,H,x,y = list(map(int, input().split()))

if x == W/2 and y == H/2:
  print(W*H/2, 1)
else:
  print(W*H/2, 0)
# Judge status: Wrong Answer
import sys
N = list(input())

for n in range(len(N)-1):
    i = int(N[n])
    if i != 9:
        cnt1 = len(N[:n])
        cnt2 = len(N[n+1:])
        print((cnt1*9)+(i-1)+(cnt2*9))
        sys.exit(0)
        
if N[-1] == 9:
    print(len(N)*9)
else:
    print(8+((len(N)-1)*9))
# Judge status: Accepted
import math

n, h = map(int, input().split())
b = [0] * n
maxa = 0
for i in range(n):
    x, y = map(int, input().split())
    maxa = max(x, maxa)
    b[i] = y
b.sort(reverse = True)
ans = 0
for i in range(n):
    if b[i] < maxa:
        break
    h -= b[i]
    ans += 1
    if h <= 0:
        break
if not h <= 0:
    ans += math.ceil(h / maxa)
print(ans)
# Judge status: Wrong Answer
import sys
X, Y, A, B, C = sys.stdin.readline().split()
X = int(X)
Y = int(Y)
C = int(C)
scoreA = list(map(int, sys.stdin.readline().split()))
scoreB = list(map(int, sys.stdin.readline().split()))
scoreC = list(map(int, sys.stdin.readline().split()))
scoreA.sort(reverse=True)
scoreB.sort(reverse=True)
scoreC.sort(reverse=True)
scoreA = scoreA[:X-1]
scoreB = scoreB[:Y-1]
scoreAll = scoreA + scoreB + scoreC
scoreAll.sort(reverse=True)
print(sum(scoreAll[:X+Y-1]))
# Judge status: Accepted
from itertools import permutations

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

dist = 0
cnt = 0
for pattern in permutations(xy):
    cnt += 1
    for i in range(n - 1):
        x1, y1 = pattern[i]
        x2, y2 = pattern[i + 1]
        dist += pow(pow(x1 - x2, 2) + pow(y1 - y2, 2), 1 / 2)
res = dist / cnt
print(res)
# Judge status: Accepted
n = int(input())
s = str(input())
ns = s
while '()' in ns:
    ns = ns.replace('()', '')
l = ns.count(')')
r = ns.count('(')
print('(' * l + s + ')' * r)
# Judge status: Accepted
import sys
 
l, r = map(int, input().split())
ans = 10 ** 10
for i in range(l, r):
  for j in range(i+1, r+1):
    if (i * j) % 2019 == 0:
      print(0)
      sys.exit()
    ans = min(ans, (i*j) % 2019)
print(ans)
# Judge status: Accepted
s = list(input())
t = list(input())
alph = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
s0, t0 = [], []
for i in range(26):
    for j in s:
        if alph[i] == j:
            s0.append(j)
    for j in t:
        if alph[25 - i] == j:
            t0.append(j)
s0 = "".join(s0)
t0 = "".join(t0)
print("Yes" if s0 < t0 else "No")
# Judge status: Accepted
n = int(input())
a = n%1000
if a == 0 :
    print(a)
else:
    print(1000-a)
# Judge status: Accepted
N,K = map(int,input().split())
R,S,P = map(int,input().split())
T = list(input())
d = {'r':P,'s':R,'p':S}
ans = 0
for i,c in enumerate(T):
    if i < K or c != T[i-K]:
        ans += d[c]
        continue
    else:
        T[i] = '_'
print(ans)
# Judge status: Accepted
N = int(input())
A = int(input())
if(N%500 <= A):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import sys


def LI():
    return list(map(int, input().split()))


N, K, S = LI()
if K == 0:
    if S == 10**9:
        for i in range(N):
            print(1, end=" ")
    else:
        for i in range(N):
            print(10**9, end=" ")
    sys.exit()
for i in range(K):
    print(S, end=" ")
if S == 10**9:
    for i in range(N-K):
        print(S-1, end=" ")
else:
    for i in range(N-K):
        print(S+1, end=" ")
# Judge status: Wrong Answer
N, K = map(int, input().split())
li = list(map(int, input().split()))
cnt = li.index(1) + 1
ans = 0
ans += (cnt -1 + K -2)//(K-1)
ans += (N - cnt +K-2)//(K-1)

print(ans)