Harryxun/stf_run huggingface dataset:
import sys
N,M=list(map(int, input().split()))

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

a=["a" for _ in range(N+1)]

if len(s)==0 and N==1:
    print(0)
    sys.exit()
    
elif len(s)==0:
    print(10**(N-1))
    sys.exit()

for i in s:
    if i[1]==0 and i[0]==1 and N!=1:
        print(-1)
        sys.exit()
   
    if a[i[0]-1]=="a":
        a[i[0]-1]=str(i[1])
    
    elif a[i[0]-1]!="a" and a[i[0]-1]==str(i[1]):
        continue
        
    elif a[i[0]-1]!="a" and a[i[0]-1]!=str(i[1]):
        print(-1)
        sys.exit()

num=[int(i) if i!="a" else 0 for i in a ]
    
        
if N==1:
    print(int(num[2]))
elif N==2:
    ans=10*int(num[1])+int(num[2])
    if ans//10==0:
        ans+=10
    print(ans)
elif N==3:
    ans=100*int(num[0])+10*int(num[1])+int(num[2])
    
    if ans//100==0:
        ans+=100
    print(ans) 
        
        
    

### FIXED CODE ###

import sys
N,M=list(map(int, input().split()))

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

a=["a" for _ in range(N)]

if len(s)==0 and N==1:
    print(0)
    sys.exit()
    
elif len(s)==0:
    print(10**(N-1))
    sys.exit()

for i in s:
    if i[1]==0 and i[0]==1 and N!=1:
        print(-1)
        sys.exit()
   
    if a[i[0]-1]=="a":
        a[i[0]-1]=str(i[1])
    
    elif a[i[0]-1]!="a" and a[i[0]-1]==str(i[1]):
        continue
        
    elif a[i[0]-1]!="a" and a[i[0]-1]!=str(i[1]):
        print(-1)
        sys.exit()

num=[int(i) if i!="a" else 0 for i in a ]
    
if N==1:
    print(int(num[-1]))
elif N==2:
    ans=10*int(num[0])+int(num[1])
    if ans//10==0:
        ans+=10
    print(ans)
elif N==3:
    ans=100*int(num[0])+10*int(num[1])+int(num[2])
    
    if ans//100==0:
        ans+=100
    print(ans)
num = []
for _ in range(int(input())):
    num.append(int(input()))

for i in range(len(num)):
    a = max(num[:i])
    b = max(num[i+1:])
    print(max(a, b))

### FIXED CODE ###

num = []
aaa = []
nmax = 0
n2max = 0
count = 0
n = int(input())
for i in range(n):
    a = int(input())
    aaa.append(a)
    if(nmax < a):
        n2max = nmax
        nmax = a
        count = 1
        num = [i]
    elif(nmax == a):
        count += 1
        num.append(i)
    elif(n2max < a):
        n2max = a
for i in range(len(aaa)):
    if(count >= 2) or (nmax != aaa[i]):
        print(nmax)
    else:
        print(n2max)
a = input()
if a == SUN:
  print(7)
elif a == MUN:
  print(6)
elif a==TUE:
  print(5)
elif a==WEN:
  print(4)
elif a==THU:
  print(3)
elif a==FRI:
  print(2)
elif a==SAT:
  print(1)
  

### FIXED CODE ###

a = input()
if a == 'SUN':
  print(7)
elif a == 'MON':
  print(6)
elif a=='TUE':
  print(5)
elif a=='WED':
  print(4)
elif a=='THU':
  print(3)
elif a=='FRI':
  print(2)
elif a=='SAT':
  print(1)
n = int(input())
l = [_ for _ in range(1,10)]

cnt = 9
d = [-1, 0, 1]
for i in range(10**5):
    if cnt >= n: break
    for j in d:
        if 0 <= int(str(l[i])[-1]) + j <= 9:
            l.append(l[i]*10 + l[i][-1] + j)
            cnt += 1

print(l[n-1])


### FIXED CODE ###

n = int(input())
l = [_ for _ in range(1,10)]

for i in range(10**5):
    if str(l[i])[-1] == '0':
        l.append(l[i]*10 + int(str(l[i])[-1]))
        l.append(l[i]*10 + int(str(l[i])[-1]) + 1)

    elif str(l[i])[-1] == '9':
        l.append(l[i]*10 + int(str(l[i])[-1]) - 1)
        l.append(l[i]*10 + int(str(l[i])[-1]))

    else:
        l.append(l[i]*10 + int(str(l[i])[-1]) - 1)
        l.append(l[i]*10 + int(str(l[i])[-1]))
        l.append(l[i]*10 + int(str(l[i])[-1]) + 1)

print(l[n-1])
import itertools

N = int(input())
params = []
for i in range(N):
    xyh = [int(n) for n in input().split()]
    params.append(xyh)

for cxi, cyi in itertools.product(range(101), range(101)):
    for k in range(N):
        if params[k][2] > 0:
            hight = params[k][2] + abs(params[k][0] - cxi) + abs(params[k][1] - cyi)

    for k in range(N):
        if params[k][2] != max(hight - abs(params[k][0] - cxi) - abs(params[k][1] - cyi), 0)
            break
    
    else:
        print(cxi, cyi, hight)

### FIXED CODE ###

N = int(input())

if N == 1:
    print('Hello World')
elif N == 2:
    A = int(input())
    B = int(input())
    print(A+B)
a,b=map(int, input().split())
if a-2b>0:
  print(a-2b)
else: 
  print(0)

### FIXED CODE ###

a,b=map(int, input().split())
if a-2*b>0:
  print(a-2*b)
else: 
  print(0)
# -*- coding: utf-8 -*-
a, b, c = map(int, input().split())

ans = len({a, b, c})
print(ans)


### FIXED CODE ###

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

ans = len({a, b, c})
print(ans)
X,Y,Z,K = (int(_) for _ in input().split())
A = [int(_) for _ in input().split()]
B = [int(_) for _ in input().split()]
C = [int(_) for _ in input().split()]

L=[0]*X*Y*Z
K = min(K, 3000, X*Y*Z)

for x in range(X):
    for y in range(Y):
        for z in range(Z):
            L.append(A[x]+B[y]+C[z])

L.sort(reverse = True)
for i in range(K):
    print(L[i])


### FIXED CODE ###

x,y,z,k=map(int,input().split())
a=[int(x) for x in input().split()]
b=[int(x) for x in input().split()]
c=[int(x) for x in input().split()]

a.sort(reverse=True)
b.sort(reverse=True)
c.sort(reverse=True)

s=list()

for l in range(x):
  if l>k:
    break 
  for m in range(y):
    if l*m>k:
      break
    for n in range(z):
      if l*m*n>k:
        break
      s.append(a[l]+b[m]+c[n])
 
s.sort(reverse=True)
for i in range(k):
  print(s[i])
import collections
import math


n = int(input())
aa = list(map(int, input().split()))
ls = [0] * (n-1)

c = collections.Counter(aa)

for i, j in c.items():
    ls[i] = j*(j-1)//2

total = sum(ls)

for i in aa:
    before = (c[i]-1)*(c[i]-2) // 2
    print(total - ls[i] + before)


### FIXED CODE ###

import collections
import math


n = int(input())
aa = list(map(int, input().split()))
ls = [0] * (n+1)

c = collections.Counter(aa)

for i, j in c.items():
    ls[i] = j*(j-1)//2

total = sum(ls)

for i in aa:
    before = (c[i]-1)*(c[i]-2) // 2
    print(total - ls[i] + before)
a_num, b_num, e_num = (int(n) for n in input().split(" "))
connect = defaultdict(list)
all_v = a_num + b_num
match = [0 for n in range(all_v)]
used = [0 for n in range(all_v)]
for _ in range(e_num):
    v1, v2 = (int(n) for n in input().split(" "))
    v2 += a_num + 1
    connect[v1].append(v2)
    connect[v2].append(v1)
def dfs(here,used,match,connect):
    used[here] = 1
    for near in connect[here]:
        if not match[near] or (not used[near] and dfs(near,used,match,connect)):
            match[here] = near
            match[near] = here
            return 1
    return 0


answer = 0
for i in range(all_v):
    if not match[i] and dfs(i,used,match,connect):
        answer += 1
print(answer)

### FIXED CODE ###

from collections import defaultdict
def dfs(here,used,match,connect):
    used[here] = 1
    for near in connect[here]:
        m = match[near]
        if m < 0 or (not used[m] and dfs(m,used,match,connect)):
            match[here] = near
            match[near] = here
            return 1
    return 0

a_num, b_num, e_num = (int(n) for n in input().split(" "))
connect = defaultdict(list)
all_v = a_num + b_num
match = [-1 for n in range(all_v)]
for _ in range(e_num):
    v1, v2 = (int(n) for n in input().split(" "))
    v2 += a_num
    connect[v1].append(v2)
    connect[v2].append(v1)
answer = 0
for i in range(all_v):
    if match[i] < 0:
        used = [0 for n in range(all_v)]
        if dfs(i,used,match,connect):
            answer += 1
print(answer)
import math

ABC = input().split()

a = int(ABC[0])
b = int(ABC[1])
c = int(ABC[2])
#a = b = c = pow(10,9)

l = 2*math.sqrt(a*b)
r = c - a - b

lint = int(l)

rl = r-l

# print(str(l) + " " + str(r))

# print(str(l-float(lint)) + " " + str(rl))

if 0 < rl or math.isclose(0,rl):
    print("Yes")
else:
    print("No")




### FIXED CODE ###

import math

ABC = input().split()

a = int(ABC[0])
b = int(ABC[1])
c = int(ABC[2])
#a = b = c = pow(10,9)

l2  = 4 * a * b
r = c - a - b
r2 = r * r

# if l2 < r2:
#     print("Yes")
# else:
#     print("No")

if r > 0 :
    if l2 < r2:
        print("Yes")
    else:
        print("No")
else:
    print("No")
n, k = map(int, input().split())
lst = list(map(int, input().split()))
a = lst.index(1)
print(math.ceil(a/2) + math.ceil((n-a-1)/2))

### FIXED CODE ###

import math
n, k = map(int, input().split())
lst = list(map(int, input().split()))
a = lst.index(1)
print(math.ceil((n - 1) / (k-1)))
t = [int(input()) for _  in range(5)]
total = 0
amari = []

for ti in t:
    d, m = divmod(ti, 10)
    total += ti - m
    if m > 0:
        amari.append(m)
total += min(amari) + 10 * (len(amari) - 1)
print(total)

### FIXED CODE ###

t = [int(input()) for _  in range(5)]
total = 0
amari = []

for ti in t:
    d, m = divmod(ti, 10)
    total += ti - m
    if m > 0:
        amari.append(m)
if amari:
    total += min(amari) + 10 * (len(amari) - 1)
print(total)
# -*- coding: utf-8 -*-
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def make_divisors(n): #約数列挙の関数を一部改変
    lower_divisors , upper_divisors = [], [] 
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return upper_divisors[-1]

N = int(readline())
ans = make_divisors(N)
print(len(str(ans)))

### FIXED CODE ###

n = int(input())
ans = float('inf')
for i in range(1,int(n**0.5) + 1):
  if n % i == 0:
    ans = min(ans,len(str(n // i)))
print(ans)
n, l = map(int, input().split())
tastes = range(l, n + l)
ijo = [taste for taste in tastes if taste >= 0]
under = [taste for taste in tastes if taste < 0]
if len(ijo) == 0:
    print(sum(under[:-1]))
elif len(under) == 0:
    print(sum(ijo[1:]))
else:
    print(sum(tastes))


### FIXED CODE ###

s = input()
difficult = False
for i in range(3):
    if s[i] == s[i+1]:
        difficult = True

if difficult:
    print("Bad")
else:
    print("Good")
# -*- coding: utf-8 -*-
 
## Library
 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools

## input
 
# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]
 
H,W=map(int, input().split())
S = []

S.append(['']*(W+2))
for _ in range(H):
    S.append(['']+list(input())+[''])
S.append(['']*(W+2))

ans = "Yes"

# 内部
for i in range(1,W+1):
    for j in range(1,H+1):
        if S[i][j] == "#":
            if S[i-1][j] == "." and S[i+1][j] == "." and  S[i][j-1] == "." and  S[i][j+1]== ".":
                print("No")
                sys.exit()

print(ans)

### FIXED CODE ###

# -*- coding: utf-8 -*-
 
## Library
 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools

## input
 
# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]
 
H,W=map(int, input().split())
S = []

S.append(['.']*(W+2))
for _ in range(H):
    S.append(['.']+list(input())+['.'])
S.append(['.']*(W+2))

for i in range(1,H-1):
    for j in range(1,W-1):
        if S[i][j] == "#" and S[i-1][j] == "." and S[i+1][j] == "." and  S[i][j-1] == "." and  S[i][j+1]== ".":
            print("No")
            sys.exit()

print("Yes")
4
1 3 2 1

### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
base = 0
for h in H:
    if base > h:
        print('No')
        break
    base = max(base,h-1)
else:
    print('Yes')
x = input()

print(x**3)

### FIXED CODE ###

x = int(input())

print(x**3)
n=int(input())
text=[input() for i in range(n)]
print("".join(sorted(text)))

### FIXED CODE ###

n,l=map(int,input().split())
text=[input() for i in range(n)]
print("".join(sorted(text)))
n = int(input())
data = list(map(int, input().split()))
 
a = 1
i = 0
    
while i<n:
  while j < n:
  	if data[j]==0:
    	a = 0
    	break
    j +=1  
  a = a*data[i]
  i += 1

if a > 10**18:
  a = -1
 
print(a)

### FIXED CODE ###

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

flag = 0
if data.count(0) > 0:
	print(0)
else:
  a = data[0]
  for i in range(1,n):
    a = a*data[i]
    if a > 10**18:
      flag = 1
      break
      
  if flag == 1:
    print('-1')
  else:
    print(a)
import sys

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def solve():
    n, k, s, t = nm()
    a = [x ^ s for x in nl() if x & s == s and x | t == t]
    n = len(a)
    t ^= s
    s = 0

    C = [[0]*(n+1) for i in range(n+1)]
    for i in range(n+1):
        for j in range(i+1):
            if j == 0:
                C[i][j] = 1
            elif i > 0:
                C[i][j] = C[i-1][j] + C[i-1][j-1]
    D = [0]*(n+1)
    for i in range(n+1):
        for j in range(1, k+1):
            D[i] += C[i][j]
    for i in range(n, 0, -1):
        D[i] -= D[i-1]
    l = list()
    for i in range(20, -1, -1):
        if t & (1 << i):
            l.append(i)
    p = len(l)
    na = list()
    for x in a:
        v = 0
        for i in l:
            v = v << 1 | x >> i & 1
        na.append(v)

    return
    pc = [0]*(1 << p)
    for bit in range(1 << p):
        for i in range(p):
            if not bit & (1 << i):
                pc[bit | (1 << i)] = pc[bit] + 1
    return
    l = [0]*(1 << p)
    ans = 0
    for bit in range(1 << p):
        cur = 0
        for x in na:
            l[bit&x] += 1
            cur += D[l[bit&x]]
        for x in na:
            l[bit&x] -= 1
        if pc[bit] & 1:
            ans -= cur
        else:
            ans += cur
    print(ans)
    return

solve()


### FIXED CODE ###

import sys

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def popcount(x):
    x = x - ((x >> 1) & 0x55555555)
    x = (x & 0x33333333) + ((x >> 2) & 0x33333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    return x & 0x0000007f


def solve():
    n, k, s, t = nm()
    a = [x ^ s for x in nl() if x & s == s and x | t == t]
    n = len(a)
    t ^= s
    s = 0
    C = [[0]*(n+1) for i in range(n+1)]
    for i in range(n+1):
        for j in range(i+1):
            if j == 0:
                C[i][j] = 1
            elif i > 0:
                C[i][j] = C[i-1][j] + C[i-1][j-1]
    D = [0]*(n+1)
    for i in range(n+1):
        for j in range(1, min(k, n)+1):
            D[i] += C[i][j]
    for i in range(n, 0, -1):
        D[i] -= D[i-1]
    l = list()
    for i in range(20, -1, -1):
        if t & (1 << i):
            l.append(i)
    p = len(l)
    na = list()
    for x in a:
        v = 0
        for i in l:
            v = v << 1 | x >> i & 1
        na.append(v)
    pc = [popcount(i) for i in range(1 << p)]
    l = [0]*(1 << p)
    ans = 0
    for bit in range(1 << p):
        cur = 0
        for x in na:
            l[bit&x] += 1
            cur += D[l[bit&x]]
        for x in na:
            l[bit&x] -= 1
        if pc[bit] & 1:
            ans -= cur
        else:
            ans += cur
    print(ans)
    return

solve()
N, M = map(int,input().split())
SC = [-1]*(N+1)
ans = [0]*N
for _ in range(M):
    s,c = map(int,input().split())
    if SC[s] != -1 and SC[s] != c:
        print(-1)
        exit()
    SC[s] = c

for i in range(10**(N-1),10**N):
    s = str(i)
    for j in range(1,N+1):
        if SC[j] == -1:
            continue
        if SC[j] != int(s[j-1]):
            flg = 0
            break
    if not flg:
        flg = 1
        continue
    if flg:
        print(i)
        exit()
print(-1)

### FIXED CODE ###

N, M = map(int,input().split())
SC = [-1]*(N+1)
ans = [0]*N
for _ in range(M):
    s,c = map(int,input().split())
    if SC[s] != -1 and SC[s] != c:
        print(-1)
        exit()
    SC[s] = c
flg = 1
if N == 1:
    st = 10**(N-1) -1
else:
    st = 10**(N-1)
for i in range(st,10**N):
    s = str(i)
    for j in range(1,N+1):
        if SC[j] == -1:
            continue
        if SC[j] != int(s[j-1]):
            flg = 0
            break
    if not flg:
        flg = 1
        continue
    if flg:
        print(i)
        exit()
print(-1)
A,x,c = input().split()
print(A[0]+x[0]+C[0])

### FIXED CODE ###

A,x,C = input().split()
print(A[0]+x[0]+C[0])
N = int(input())
A = list(map(int, input().split()))
B = set(list)
if len(A) == len(B):
  print("YES")
else:
  print("NO")

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
B = set(A)
if len(A) == len(B):
  print("YES")
else:
  print("NO")
import itertools


N, X, Y = map(int, input().split())
lst = [0] * N
for l,r in itertools.combinations(range(1,N+1),2):
    lst[min(r-l,abs(r-Y)+1+abs(l-X))] += 1
for i in range(1,N+1):
    print(lst[i])

### FIXED CODE ###

import itertools

N, X, Y = map(int, input().split())
lst = [0] * N
for l, r in itertools.combinations(range(1, N + 1), 2):
    lst[min(r - l, abs(r - Y) + 1 + abs(l - X))] += 1
for i in range(1, N):
    print(lst[i])
a = int(input())
b = int(input())

x = a + b
y = a - b
z = a * b

print(max(x, y, z))

### FIXED CODE ###

a, b = map(int, input().split())

x = a + b
y = a - b
z = a * b
print(max(x, y, z))
list=[int(input()) for i in range(3)]
print("Yes" if len(set(list))=2 else "No")

### FIXED CODE ###

s=list(set(input().split()))
if len(s)==2:
  print("Yes")
else:
  print("No")
s=input()
c=0
tmp=0
for i in range(3):
    if s[i]='S':
        tmp+=1
        if c<tmp:
            c=tmp
    else:
        tmp=0
print(c)

### FIXED CODE ###

s=input()
c=0
tmp=0
for i in range(3):
    if s[i]=='R':
        tmp+=1
        if c<tmp:
            c=tmp
    else:
        tmp=0
print(c)
a, b, c = [input(i) for i in input().split()]

total = 0
for a in range(a, b + 1):
    
    if c % d == 0:
    total += 1

print(total)

### FIXED CODE ###

a, b, c = [int(i) for i in input().split()]

total = 0
for d in range(a, b + 1):
    
    if c % d == 0:
        total += 1

print(total)
x, y = map(int,input().split())
print(y+x)

### FIXED CODE ###

x, y = input().split()
print(y+x)
S = input()

base_list = ["A", "T", "G", "C"]
seq_list = []
seq = ""
for s in S:
  if s in base_list:
    seq += s
  else:
    seq_list.append(seq)
    seq = ""
seq_len_list = [len(seq) for seq in seq_list]
print(max(seq_len_list))

### FIXED CODE ###

S = input()

base_list = ["A", "T", "G", "C"]
seq_list = []
seq = ""
for s in S:
  if s in base_list:
    seq += s
  else:
    seq_list.append(seq)
    seq = ""
seq_list.append(seq)
seq_len_list = [len(seq) for seq in seq_list]
print(max(seq_len_list))
# C - Typical Stairs

import sys
sys.setrecursionlimit(10000)

MOD = (10 ** 9) + 7
INF = float('inf')
N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]
dp = [INF] * (N + 1)

def f(i):
    if dp[i] != INF:
        return dp[i]
    else:
        if i in A:
            dp[i] = 0
        elif i < 2:
            dp[i] = 1
        else:
            dp[i] = (f(i - 1) + f(i - 2)) % MOD
        return dp[i]

print(f(N))


### FIXED CODE ###

# C - Typical Stairs

MOD = (10 ** 9) + 7
N, M = map(int, input().split())
A = [False] * (N + 1)
for _ in range(M):
    A[int(input())] = True
dp = [0] * (N + 1)
dp[0] = 1
if A[1] == False:
    dp[1] = 1

for i in range(2, N + 1):
    if A[i] == True:
        dp[i] = 0
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD

print(dp[N])
stones = [0, 0]
n = input()
stones.append(input())
stones[0] = (stones[2] + 1) % 2
stones.append(1)
for i in range(n - 1):
  m = input()
  if i % 2 == 1:
    if stones[-2] == m:
      stones[-1] += 1
    else:
      stones.append(m)
      stones.append(1)
  else:
    if stones[-2] == m:
      stones[-1] += 1
    else:
      stones[-3] += stones[-1] + 1
      stones = stones[:-2]
ans = 0
for j in range(0, len(stones), 2):
  if stones[j] == 0:
    ans += stones[j + 1]
print ans

### FIXED CODE ###


while True:
  stones = [0, 0]
  n = input()
  if not n:
    break
  stones.append(input())
  stones.append(1)
  for i in range(n - 1):
    m = input()
    if i % 2 == 1:
      if stones[-2] == m:
        stones[-1] += 1
      else:
        stones.append(m)
        stones.append(1)
    else:
      if stones[-2] == m:
        stones[-1] += 1
      else:
        if len(stones) > 2:
          stones[-3] += stones[-1] + 1
          stones = stones[:-2]
        else:
          stones[-2] = m
          stones[-1] += 1
  ans = 0
  for j in range(0, len(stones), 2):
    if stones[j] == 0:
      ans += stones[j + 1]
  print ans
imports sys

c = sys.stdin.readline()

if ord(c) >= 'a' and ord(c) <= 'z':
  print('a')
else:
  print('A')

### FIXED CODE ###

import sys

c = sys.stdin.readline().rstrip('\n')

if ord(c) >= ord('a') and ord(c) <= ord('z'):
  print('a')
else:
  print('A')
H,A=map(int,inoput().split())
print-(-H/A)

### FIXED CODE ###

x,y= map(int,input().split())
s = -(-x//y)
print(s)
N=int(input())
v=list(map(int, input().split()))
v.sort()
for i in range(N-2):
  v1=[(v[0]+v[1])/2]
  v1.extend(v[2:])
  v=v1
print(sum(v1)/2)

### FIXED CODE ###

N=int(input())
v=list(map(int, input().split()))
v.sort()
for i in range(N-2):
  v1=v
  v=[(v1[0]+v1[1])/2]
  v.extend(v1[2:])
print(sum(v)/2)
H,W=map(int,input().split())
hw=[]
for _ in range(H):
    hw.append(input())

yoko_list=[]
tate_list=[]
for i in range(H):
    for j in range(W):
        if hw[i][j]=="#":
            break
        elif j==W-1:
            yoko_list.append(i)

for i in range(W):
    for j in range(H):
        if hw[j][i]=="#":
            break
        elif j==H-1:
            tateH,W=map(int,input().split())

### FIXED CODE ###

H,W=map(int,input().split())
hw=[]
for _ in range(H):
    hw.append(input())

yoko_list=[]
tate_list=[]
for i in range(H):
    for j in range(W):
        if hw[i][j]=="#":
            break
        elif j==W-1:
            yoko_list.append(i)

for i in range(W):
    for j in range(H):
        if hw[j][i]=="#":
            break
        elif j==H-1:
            tate_list.append(i)

for i in range(H):
    if not i in yoko_list:
        p=0
        for j in range(W):
            if not j in tate_list:
                p+=1
                if p==W-len(tate_list):
                    print(hw[i][j])
                else:
                    print(hw[i][j],end="")
H, A = int(input().split())

x = 1
while True:
  if 0 <= H/(A*x):
    H -= A
    a += 1
  else:
    break
print(x)

### FIXED CODE ###

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

x = 0
while True:
  if H <= 0:
    break
  if H > 0:
    H -= A
    x += 1
print(x)
N, M = (int(i) for i in input().split())  
X = [int(i) for i in input().split()] 
s= 0
if N >= M:
    print(0)
else
    X.sort()
    for i in range(M-N-1):
        s = s+X[i]
    print(s)

### FIXED CODE ###

N, M = (int(i) for i in input().split())  
X = [int(i) for i in input().split()] 
lg_bw_x = [] 
s= 0
if N >= M:
    print(0)
else:
    X.sort()
    for i in range(M-1):
        lg_bw_x.append(X[i+1] - X[i])
    lg_bw_x.sort()
    for j in range(M-N):
        s = s+lg_bw_x[j]
    print(s)