peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
D=int(input())
if D==25:
    print('Christmas')
if D==24:
    print('Christmas Eve')
if D==23:
    print('Christmas Eve Eve')
if D==22:
    print('Christmas Eve Eve Eve')
# Judge status: Accepted
n,m = map(int,input().split())
a = list(map(int, input().split()))
ord = []
summ = sum(a)
isSmallThan = True
for j in range(m):
  ord.append(max(a))
  a.remove(max(a))
for k in range(m):
  if ord[k]/summ >= 1/(4*m):
    isSmallThan = True
  else:
    isSmallThan = False
    break
print('Yes' if isSmallThan else 'No')
# Judge status: Accepted
n,h,*d=map(int,open(0).read().split())
a=max(d[::2])
b=sorted(d[1::2])
c=0
while b and b[-1]>a>0<h:h-=b.pop();c+=1
print(c--h*(h>0)//a)
# Judge status: Accepted
import itertools as itool
N=int(input())
plist=list(map(int, input().split()))
qlist=list(map(int, input().split()))
mylist=list(itool.permutations(range(1,N+1)))

print(abs(mylist.index(tuple(plist))-mylist.index(tuple(qlist))))
# Judge status: Accepted
A, B, C, K = list(map(int, input().split()))
if K % 2 == 0:
  print(A-B)
else:
  print(B-A)
# Judge status: Accepted
def main():
    S = input()
    we = ("W" in S and "E" in S) or ("W" not in S and "E" not in S)
    ns = ("N" in S and "S" in S) or ("N" not in S and "S" not in S)
    if we and ns:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
# Judge status: Accepted
lst = [int(a) for a in input()]
for bit in range(1 << len(lst)):
    sum = 0
    op_lst = []
    for i in range(len(lst)):
        if bit & (1 << i):
            sum += lst[i]
            op_lst.append('+')
        else:
            sum -= lst[i]
            op_lst.append('-')
    if sum == 7:
        print(lst[0], op_lst[1], lst[1], op_lst[2], lst[2], op_lst[3], lst[3], '=7', sep='')
        break
# Judge status: Accepted
a, b = input().split()
combine = int(a + b)
sqr_combine = combine ** 0.5
c = int(sqr_combine)

if sqr_combine == c :
    print("Yes")
else :
    print("No")
# Judge status: Wrong Answer
n,h=map(int,input().split())
ab=[]
ans=0
for i in range(n):
  aa,bb=map(int,input().split())
  ab.append([aa,bb])

ab.sort(key=lambda x: x[0],reverse=True)
katana=ab[0][0]
ab.sort(key=lambda x: x[1],reverse=True)
cnt=0
# print(ab)
for a,b in ab:
  if b>=katana:
    cnt+=1
ans+=cnt
for i in range(cnt):
  h-=ab[i][1]

from math import ceil
ans+=ceil(h/katana)
print(ans)
# Judge status: Accepted
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

x=min(a,b,c,d,e)
ans=-(-n//x)+4
print(ans)
# Judge status: Wrong Answer
a,b=map(int,input().split())
c=round(a+b/2)
print(c)
# Judge status: Accepted
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


a,b,x = list(map(int, input().split()))
import math
if x*2>=a*a*b:
    the = (a*b - x/a) / (0.5*a*a)
else:
    the = (b*b*a) / (2*x)
ans = math.atan(the)
print(ans*180/math.pi)
# Judge status: Accepted
abc=sorted(list(map(int,input().split())),reverse=True)
a=[1]*10
for i in range(10**7+5*10**6):
    a.append(a)
print(sum(abc)+abc[0]*9)
# Judge status: Accepted
sentence = input()
sentence_len = len(sentence)
iter_num = int(sentence_len/2)-1 if sentence_len % 2 == 0 else int(sentence_len/2)

counter = 0

for i in range(iter_num+1):
    if sentence[i] == sentence[sentence_len-i-1]:
        pass
    else:
        counter += 1
        
print(counter)
# Judge status: Accepted
n = int(input())
p = list(map(int, input().split()))

ans = 1
min = p[0]
for i in  range(1, n):
    if min >= p[i]:
        ans += 1
        min = p[i]

print(ans)
# Judge status: Accepted
x, y = map(int,input().split())

if x % y == 0:
  ans = x // y
else:
  ans = x // y + 1
 
print(ans)
# Judge status: Accepted
# coding: utf-8

def solve(*args: str) -> str:
    n, k = map(int, args[0].split())
    A = tuple(map(int, args[1].split()))

    l, r = 1, max(A)
    while 0.1 < r-l:
        m = (l+r)/2
        cnt = 0
        for a in A:
            cnt += -int(-a//m)-1

        if k < cnt:
            l = m
        else:
            r = m

    return str(-int(-l//1))


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))
# Judge status: Wrong Answer
n = int(input())
ans = 0

if n%2==0:
    n /= 2
    fives = 5
    while 1:

        if fives > n: 
            break
        ans += n // fives
        fives *= 5

print(ans)
# Judge status: Accepted
A, B = map(int, input().split())

if A == 1:
    A = 14

if B == 1:
    B = 14

if A > B:
    print("Alice")
elif A == B:
    print("Draw")
else:
    print("Bob")
# Judge status: Wrong Answer
makeA = lambda c: (ord('z')-ord(c)+1) % 26
s = list(map(makeA,list(input())))
print(s)
K = int(input())
len_s = len(s)
print(len_s)
for i in range(len_s-1):
    if s[i] <= K:
        K -= s[i]
        s[i] = 0
        print(s)
if K > 0:
    s[-1] = (s[-1] + 26 - (K % 26)) % 26
print(s)
makeS = lambda n: chr((26-n)%26+ord('a'))
print(''.join(list(map(makeS,s))))
# Judge status: Accepted
a,b=map(int,input().split())
print(min(str(a)*b,str(b)*a))
# Judge status: Wrong Answer
s = input()

if s[2] == s[3]:
    if s[4] == s[5]:
        print("Yes")
else:
    print("No")
# Judge status: Accepted
A, B = map(int, input().split())
ans = 0
for i in range(A, B+1):
    i = str(i)
    if i == i[::-1]:
        ans += 1

print(ans)
# Judge status: Accepted
# coding: utf-8
# Your code here!
import math

N = int(input())
S = ["" for i in range(N)]
for i in range(N):
    S[i] = input()
    
S.sort()

if N==1:
    print(1)
else:
    count = 1
    for i in range(N-1):
        if S[i] != S[i+1] :
            count += 1
    print(count)
# Judge status: Wrong Answer
n=int(input())
h=list(map(int, input().split()))

dp=[10**5 for i in range(n)]
dp[0]=0
for i in range(n):
    if i+1<n:dp[i+1] = min(dp[i+1], dp[i] + abs(h[i+1]-h[i]))
    if i+2<n:dp[i+2] = min(dp[i+2], dp[i] + abs(h[i+2]-h[i]))

print(dp[n-1])
# Judge status: Accepted
a, b = map(int, input().split())
print(*[min(a, b)] * max(a, b), sep='')
# Judge status: Wrong Answer
n = int(input())
a =[int(i) for i in input().split()]
a.sort(reverse=True)

s = sum(a)-a[-1]
print(s)
# Judge status: Accepted
import numpy as np
n,m,x=map(int,input().split())
ca=[list(map(int,input().split())) for i in range(n)]
ca=np.array(ca)
ans=np.array([])
ans_list=np.array([])
for i in range(2**n):
  flag=True
  ans=np.array([0]*(m+1))
  for j in range(n):
    if (i>>j)&1:
      ans+=ca[j]
  for i in range(1,len(ans)):
    if x>ans[i]:
      flag=False
      break
  if flag==True:
    ans_list=np.append(ans_list,ans[0])
if len(ans_list)>=1:
  print(int(min(ans_list)))
else:
  print(-1)
# Judge status: Wrong Answer
from collections import *
n = int(input())
a = list(map(int, input().split()))
c = Counter()
r = 0
for i in range(n):
    r += c[a[i]+i] 
    c[i-a[i]] += 1
print(r)
# Judge status: Wrong Answer
s = input()
ans = 0
if "N" in s:
    if "S" in s: ans += 1
else: ans += 1
if "W" in s:
    if "E" in s: ans += 1
else: ans += 1
print("Yes" if ans==2 else "No")
# Judge status: Accepted
N, K = map(int, input().split())
d = []
for i in range(N):
  a, b = map(int, input().split())
  d.append((a, b))

d.sort(reverse=True)
while K > 0:
  a, b = d.pop()
  K -= b

print(a)
# Judge status: Wrong Answer
def main():
    N = int(input())
    A = [input()]
    for i in range(1, N):
        W = input()
        if A[-1][-1] == W[0]:
            for j in range(i-1):
                if A[j] == W:
                    print("No:重複")
                    return
            A.append(W)
        else:
            print(A, "No:違う")
            return
    print("Yes")

main()
# Judge status: Accepted
a,b=map(int,input().split())

x = 1
ans = 0

while x < b:
    x = x + a -1
    ans = ans + 1

print(ans)
# Judge status: Accepted
import bisect
# 計算量を大体で見積もってぶん投げればおｋ
# この問題だとO(a**0.25)
x = int(input())

for i in range(-1000, 1000):
    for j in range(-1000, 1000):
        if i ** 5 - j ** 5 == x:
            print(i, j)
            quit()
# Judge status: Accepted
n = int(input())
a = input().split()
b = [0] * n
for i in range(n):
    if i % 2 == 0:
        b[i//2] = a[n-1-i]
    else:
        b[n-(i+1)//2] = a[n-1-i]
print(' '.join(b))
# Judge status: Accepted
a, b, c, d = list(map(int, input().split()))

print(max([a*c, a*d, b*c, b*d]))
# Judge status: Accepted
n,m,k = map(int, input().split())

for i in range(n+1):
  for j in range(m+1):
    if i*(m-j)+j*(n-i)==k:
      print("Yes")
      exit()
print("No")
# Judge status: Accepted
a, b = input().split()
a = int(a)
b = str(b).replace(".", "")
print(a * int(b) // 100)
# Judge status: Wrong Answer
n=int(input())
a= [int(input()) for i in range(n)] 

a.sort()
ans=0
m=1
print(a)
for i in range(1,n):
    if a[i-1] == a[i]:
        m+=1
    else:
        ans+=(m%2)
        m=1

ans+=(m%2)

print(ans)
# Judge status: Wrong Answer
N, K = map(int, input().split())
flag = True
ans = []
while flag:
    M = N % K
    N = N // K
    ans.append(M)
    if N // K == 0:
        ans.append(N)
        flag = False
print(len(ans))
# Judge status: Wrong Answer
h, a = map(int, input().split())

if a>=h:
	print(1)
else:
	c = h//a
	print(c+1)
# Judge status: Wrong Answer
S = str(input())
T = str(input())
if S[-1] == "e":
    if T[-1] != "e":
        print("Yes")
    else:
        print("No")

else:
    print("Yes")
# Judge status: Wrong Answer
import itertools
n=int(input())
a=tuple(map(int,input().split()))
b=tuple(map(int,input().split()))
seq=range(n)
l=list(itertools.permutations(seq))
#print(l[0])
a_num=0
b_num=0
for i in range(len(l)):
  if l[i]==a:
    a_num=i
  elif l[i]==b:
    b_num=i
print(abs(a_num-b_num))
# Judge status: Wrong Answer
n, x, y = map(int, input().split())
dists = [0 for i in range(n)]

for i in range(1, n+1):
  for j in range(1, n+1):
    dist = min(abs(j-i), 1 + abs(x-i)+abs(y-j), 1 + abs(y-i)+abs(x-j))
    if dist > 0:
      dists[dist-1]+=1
    
for dis in dists:
  print(dis//2)
# Judge status: Accepted
import sys
from heapq import heappush, heappop, heapify
import math
from math import gcd
import itertools as it
from collections import deque 

input = sys.stdin.readline

def inp():
    return int(input())
def inpl():
    return list(map(int, input().split()))
def _dbg(o):
    print(o, file=sys.stderr)

# ---------------------------------------

N = inp()
mod = 10**9 + 7
_dbg(mod)

a = 1
b = 1
c = 1
for _ in range(N):
    a = (a * 10) % mod
    b = (b * 9) % mod
    c = (c * 8) % mod
print((a - 2 * b + c) % mod)
# Judge status: Accepted
#!/usr/bin/env python3


N = int(input())
S = input()

sli = [ord(c) for c in S]
sli_mod = [n + N for n in sli]

for i, s in enumerate(sli_mod):
    if s > ord('Z'):
        sli_mod[i] -= 26

# print(sli_mod)
final = [chr(c) for c in sli_mod]
out = "".join(final)
print(out)
# Judge status: Accepted
A, B, C, D = map(int, input().split())
while A>1 :
  C=C-B
  A=A-D
else:
  if C>0 and A<=0:
    print("No")
  elif C<0 or C-B<=0:
    print("Yes")
  else:
    print("No")
# Judge status: Accepted
def resolve():
    '''
    code here
    '''
    N = int(input())
    As = [int(item) for item in input().split()]

    cnt = 0
    is_not_found = True
    while is_not_found:
        for i in range(N):
            if As[i] % 2 == 0:
                As[i] //= 2
            else:
                is_not_found = False
                break
        else:
            cnt += 1
    print(cnt)

if __name__ == "__main__":
    resolve()
# Judge status: Accepted
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    A, B, C, D = LI()

    ans = max(min(B, D) - max(A, C), 0)
    print(ans)

if __name__ == '__main__':
    resolve()
# Judge status: Wrong Answer
a = input()
b = list(input())
count = 0
ans = 0
for c in a:
  if c == "I":
    count += 1
  else:
    count -= 1
  if count >= ans:
    ans += 1
print(ans)
# Judge status: Accepted
n = int(input())
x = list(map(int, input().split()))
y = sorted(x)
k, l = y[n//2-1], y[n//2]
for i in range(n):
    if x[i] <= k:
        print(l)
    else:
        print(k)
# Judge status: Accepted
from math import sqrt, floor

def is_prime(x: int) -> bool:
    if x <= 1:
        return False

    for i in range(2, floor(sqrt(x))):
        if x % i == 0:
            return False

    return True


x = int(input())
while not is_prime(x):
    x += 1
print(x)
# Judge status: Wrong Answer
n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
tmp = [0] * n
for i in range(n):
  left = i-a[i]-k+1 if i-a[i]-k+1 >= 0 else 0
  right = i+a[i]+k-1 if i+a[i]+k-1 <= n-1 else n-1
  for j in range(left, right+1):
    tmp[j] += 1
print(' '.join(map(str, tmp)))
# Judge status: Accepted
N=input()
if ((N[0]==N[1])&(N[1]==N[2]))|((N[1]==N[2])&(N[2]==N[3])):
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
import itertools
n = int(input())

p = list(map(int, input().split()))
q = list(map(int, input().split()))

a = [i+1 for i in range(n)]
cnt = 0
ans = 0
for x in itertools.permutations(a):
    cnt += 1
    if list(x) == p: ans -= cnt
    if list(x) == q:
        ans += cnt
        break
print(ans)
# Judge status: Accepted
s=input()
print(min(s.count("0"),s.count("1"))*2)
# Judge status: Accepted
N = int(input())
x = 1

while x <= N:
    x *= 2
    
 
print(x // 2)
# Judge status: Accepted
abc = list(map(int, input().split()))
k = int(input())
for i in range(k):
    abc.sort()
    abc[-1] *= 2
print(sum(abc))
# Judge status: Accepted
import sys
 
 
def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    s, t = list(map(str, readline().rstrip().decode('utf-8').split()))
    a, b = list(map(int, readline().split()))
    if s == str(readline().rstrip().decode('utf-8')):
        print(a - 1, b)
    else:
        print(a, b - 1)
 
 
if __name__ == '__main__':
    solve()
# Judge status: Accepted
import numpy as np

N,M = map(int,input().split())
A = np.array([list(input()) for _ in range(N)])
B = np.array([list(input()) for _ in range(M)])
ans="No"
bl = False
for i in range(N-M+1):
    for j in range(N-M+1):
        if (A[i:i+M,j:j+M] == B).all():
            ans="Yes"
            break

print(ans)
# Judge status: Wrong Answer
s=input()
if s[0::2]=='L' or s[1::2]=='R':
  print('No')
else:
  print('Yes')
# Judge status: Accepted
def main():
    N = int(input())
    abc = [list(map(int, input().split())) for _ in range(N)]
    dp = [[0]*3 for _ in range(N)]
    for i in range(3):
        dp[0][i] = abc[0][i]
    for i in range(1, N):
        for j in range(3):
            dp[i][j] = max(dp[i-1][(j+1) % 3], dp[i-1][(j+2) % 3])+abc[i][j]
    print(max(dp[N-1][0], dp[N-1][1], dp[N-1][2]))


if __name__ == '__main__':
    main()
# Judge status: Accepted
n = int(input())
print(sum(len(str(i + 1)) % 2 for i in range(n)))
# Judge status: Accepted
n, k, *h = map(int, open(0).read().split())
h += [0] * 200
dp = [0] + [float("inf")] * 100200
for i in range(1, n):
  dp[i] = min(dp[i-a] + abs(h[i] - h[i-a]) for a in range(1, k + 1))
print(dp[n - 1])
# Judge status: Accepted
S=["SUN","MON","TUE","WED","THU","FRI","SAT"]
T=input()
for i in range(len(S)):
	if T==S[i]:
		print(7-i)
# Judge status: Accepted
k = int(input())
t = 7
t %= k
for i in range(k + 1):
    if t == 0:
        print(i + 1)
        break
    t = (t * 10 + 7) % k
else:
    print(-1)
# Judge status: Wrong Answer
n,k = map(int,input().split())
#print(n,k)
S=list(input())
print(S)
s=S.pop(k-1)
print(s)
s=s.lower()
print(s)
S.insert(k-1, s)

print(''.join(S))
# Judge status: Accepted
import sys
N,A,B=map(int,input().split())
print(max(B*(N-1)+A-(A*(N-1)+B)+1,0))
# Judge status: Accepted
import numpy as np

n, w = list(map(int, input().split()))
wv = np.array([list(map(int, input().split(" "))) for _ in range(n)])

dp = np.zeros((w + 1, n), dtype=np.int)
dp[wv[0, 0] :, 0] = np.full(dp[wv[0, 0] :, 0].shape, wv[0, 1])
for i in range(1, n):
    dp[:, i] = dp[:, i - 1]
    wNew, vNew = wv[i, 0], wv[i, 1]
    dp[wNew:, i] = np.fmax(dp[wNew:, i - 1], vNew + dp[:-wNew, i - 1])

print(dp[w, n - 1])
# Judge status: Accepted
H,N = map(int,input().split())
A = list(map(int,input().split()))
if H <= sum(A):
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
N = input()

a = 0  # not carried
b = 0  # carried
for i in range(len(N) - 1, -1, -1):
    t = int(N[i])
    a, b = min(a + t, b + (t + 1)), min(a + (10 - t), b + (10 - (t + 1)))
print(min(a, b + 1))
# Judge status: Wrong Answer
from collections import Counter

N = int(input())
D = list(map(int, input().split()))
MOD = 998244353

if D[0] != 0:
    print(0)
else:
    c = Counter(D)
    c = sorted(c.items(), key=lambda x: x[0])
    ans = 1
    prev = 1
    for k, v in c:
        if k == 0:
            if v > 1:
                print(0)
                break
        else:
            ans *= prev ** v
            prev = v

    print(ans)
# Judge status: Accepted
N, K = map(int, input().split())
A = list(map(int, input().split()))
L = [0 for _ in range(N+1)]
cnt = 0
while min(A) < N and cnt < K:
    cnt += 1
    for i in range(N):
        L[max(i-A[i], 0)] += 1
        L[min(i+A[i]+1, N)] -= 1
    for i in range(N):
        L[i+1] += L[i]
        A[i] = L[i]
        L[i] = 0
for i in range(N):
    print(A[i], end = ' '*(i!=N-1))
# Judge status: Accepted
a, b, c = map(int, input().split())

if a == b == c and a % 2 == 0:
	print(-1)
else:
	cnt = 0
	for _ in range(10**5):
		if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
			print(cnt)
			break
		else:
			a, b, c = (b + c) / 2, (c + a) / 2, (a + b) / 2
			cnt += 1
# Judge status: Wrong Answer
A,B,K = map(int,input().split())
if A >= K:
    A -= K
    K = 0
else:
    A = 0
    K -= A
if B >= K:
    B -= K
    K = 0
else:
    B = 0
    K -= B
print(A,B)
# Judge status: Wrong Answer
a,b = [int(_) for _ in input().split()]
print(a + b/2)
# Judge status: Accepted
t = input()
t = t.replace('P?', 'PD').replace('?D', 'PD').replace('??', 'PD').replace('?', 'D')
print(t)
# Judge status: Wrong Answer
n, m = map(int, input().split())
if n == m:
  print("Yes")
else:
  print("no")
# Judge status: Wrong Answer
n = int(input())
la = list(map(int,input().split()))
lb = list(map(int,input().split()))
lc = list(map(int,input().split()))

con = 0

for i in range(len(la)-1):
    if la[(i+1)%3]==la[i]+1:
        con += lc[la[i]-1]

print(sum(lb)+con)
# Judge status: Wrong Answer
N,K=map(int,input().split())
light=list(map(int,input().split()))
copy=[0]*N
for k in range(K):
  imo=[0]*(N+1)
  x=0
  for i in range(N):
    kido=light[i]
    imo[max(0,i-kido)]+=1
    imo[min(N-1,i+kido)+1]-=1
  for j in range(N):
    x+=imo[j]
    copy[j]=x
  if light==copy:
    break
  else:
    light=copy
print(*light)
# Judge status: Accepted
a = int(input())
s = input()

print(s if a >= 3200 else "red")
# Judge status: Accepted
X = int(input())
cnt = 0
y = 100
while y < X:
  y += y // 100
  cnt += 1
print(cnt)
# Judge status: Wrong Answer
import math
a, b = map(int, input().split())
print(math.gcd(a, b))
# Judge status: Accepted
i=list(map(int,input().split()))
j=list(map(int,input().split()))
h=i[0]
a=True
c=0
j.sort(reverse=True)
for b in j:
  c+=b
  if c>=h:
    print("Yes")
    a=False
    break
if a:
  print("No")
# Judge status: Wrong Answer
k=int(input())
 
from collections import deque
q = deque(range(1, 10))

for i in range(k-1):
    d = q.popleft()
    if d % 10 != 0:
        q.append(10 * d + d % 10 - 1)
    q.append(10*d)
    if d % 10 != 9:
        q.append(10 * d + d % 10 +1)
    
print(q.popleft())
# Judge status: Accepted
a, b = map(int, input().split())

if a*b <= 0:
    print('Zero')
elif 0 < a:
    print("Positive")
else:
    cnt = b - a + 1
    if cnt % 2 == 0:
        print('Positive')
    else:
        print("Negative")
# Judge status: Wrong Answer
n=int(input())
s=input()
c=0
x=s.rfind(")")
if x==-1:
  print(s+")"*n)
else:
  s1=s[0:x+1]
  s2=s[x+1:]+")"*len(s[x+1:])
  if s1.count("(")>=s1.count(")"):
    print(s1+")"*(s1.count("(")-s1.count(")"))+s2)
  else:
    print("("*(-s1.count("(")+s1.count(")"))+s1+s2)
# Judge status: Wrong Answer
import numpy as np
from fractions import gcd

N=int(input())
A=list(map(int, input().split()))
A=np.array(A)
mod=10**9+7
def lcm(a,b):
    return a//gcd(a,b)*b

LCM=1
for x in A:
    LCM=lcm(LCM,x)



#print(LCM)
print(int((LCM//A).sum()%mod))
# Judge status: Wrong Answer
import numpy as np

N = int(input())
heights = [int(i) for i in input().split()]

dp = np.full((N), np.Inf)

dp[0] = 0
dp[1] = heights[1] - heights[0]


for i in range(2, N):
    dp[i] = min(
        dp[i-2] + abs(heights[i] - heights[i-2]),
        dp[i-1] + abs(heights[i] - heights[i-1]),
    )

print(int(dp[N-1]))
# Judge status: Accepted
a, b = map(int, input().split())
if a + b <= 23:
    print(a + b)
else:
    print((a + b) - 24)
# Judge status: Accepted
N, M, X= list(map(int, input().split()))
arr = [list(map(int, input().split())) for i in range(N)]

def rec(i, rikai, cost):

  flag = True
  for r in rikai:
    if r <= 0: continue
    else: flag = False
  if flag:
    return cost
  if i == N:
    return 10000000000000
  
  use_rikai = [ rikai[j] - arr[i][j+1] for j in range(M) ]
  use_cost = cost + arr[i][0]
  return min(rec(i+1, use_rikai, use_cost), rec(i+1, rikai,cost))

rikai = [X for j in range(M)]
res = rec(0, rikai, 0)
if res >= 10000000000000:
  print(-1)
else: print(res)
# Judge status: Accepted
N = input()
f = 'No'
for i in N:
  if i == '7':
    f = 'Yes'
print(f)
# Judge status: Accepted
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(readline())
lst1 = list(map(int,readline().split()))
ans = []
lst1.sort()
i = 0
while True:
    if i >= n-1:
        break
    if lst1[i] == lst1[i+1]:
        ans.append(lst1[i])
        i += 1
    i += 1
if len(ans) < 2:
    print(0)
else:
    print(ans[-1]*ans[-2])
# Judge status: Accepted
data = [int(input()) for i in range(5)]
k = int(input())
flag = True
for i in range(len(data)-1):
    for j in range(i, len(data)):
        if data[j]-data[i] > k:
            flag = False

if flag:
    print("Yay!")
else:
    print(":(")
# Judge status: Accepted

def main():
    a = list(map(int, input().split()))

    ans = 0
    while True:
        a.sort()
        if a[0] == a[1] and a[1] == a[2]:
            break
        elif a[1] < a[2]:
            a[0] += 1
            a[1] += 1
        else:
            a[0] += 2
        ans += 1

    print(ans)

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
X,Y,Z = map(int,input().split())
 
print('{} {} {} '.format(Y,Z,X))
# Judge status: Accepted
a, b = map(int, input().split())

if a > b:
    print(str(b) * a)
else:
    print(str(a) * b)
# Judge status: Wrong Answer
"""
回転した後に得られる点数 = 上と下を向いている面以外の面に書かれている数
6→5→6→...と選んでいけばよさそう。
"""
X = int(input())
if X <= 6:
    print(1)
elif X <= 11:
    print(2)
else:
    cnt = X // 11
    X -= cnt * 11
    if X == 0:
        print(cnt * 2)
    elif X < 6:
        print(cnt * 2 + 1)
    else:
        print(cnt * 2 + 2)
# Judge status: Accepted
from math import sqrt
a, b = input().split()

integer = int(a + b)
sqr_int = sqrt(integer)

if sqr_int.is_integer() == True:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
#!/usr/bin/python3
# -*- coding:utf-8 -*-

from collections import defaultdict

def main():
  n = int(input())
  sp = defaultdict(list)
  sp2number = {}
  for i in range(n):
    s, p = input().strip().split()
    p = int(p)
    sp[s].append(p)
    sp2number[(s, p)] = i + 1
  for key in sorted(sp.keys()):
    for score in sorted(sp[key], reverse=True):
      print(sp2number[(key, score)])

if __name__=='__main__':
  main()
# Judge status: Wrong Answer
S = input()
if S in "a" and S in "b" and S in "c":
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
n=int(input())
s=[int(input()) for i in range(n)]
s.sort()
ans=sum(s)

for i in range(1,n):
    if ans%10!=0:
        print(ans)
        exit()
    else:
        if s[i]%10!=0:
            ans-=s[i]
        if i==n-1:
            print(0)