peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
# A - Already 2018
s=list(input())
s[3]='8'
print("".join(s))
# Judge status: Accepted
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

n,c,k = iim()
time = []
for _ in range(n):
    time.append(ii())

time.sort()

bus = 0
fst = time[0]
ans = 0
for item in time:
    if bus <= c-1 and item <= k+fst:
        bus += 1
    elif bus > c-1:
        bus = 1
        ans += 1
        fst = item
    elif item-fst > k:
        bus = 1
        ans += 1
        fst = item
    

print(ans if bus == 0 else ans+1)
# Judge status: Wrong Answer
s = input()
one = s.count("1")
zero = s.count("0")

print(min(zero,one))
# Judge status: Accepted
n,m = map(int,input().split())
mod = 10**9+7
p = [0 for _ in range(n+1)]
p_ok = [True for _ in range(n+1)]

for i in range(m):
	p_ok[int(input())] = False

p[0] = 1
for now in range(0,n):
	for next in range(now+1,min(n,now+2)+1):
		if p_ok[next]:
			p[next] += p[now]
			p[next] %= mod


ans = p[n]
print(ans%mod)
# Judge status: Wrong Answer
n = int(input())
s = input()

if n % 2 == 0:
  if s[0:int(n/2)] == s[int(n/2):]:
  	print("Yes")
else:
  print("No")
# Judge status: Accepted
from collections import Counter

N = int(input())
S = list(input())
c = Counter(S)
left_facing_west = 0
right_facing_east = c['E']
ans = float('inf')
for s in S:
    if s == 'W':
        ans = min(ans,left_facing_west+right_facing_east)
        left_facing_west += 1
    else:
        right_facing_east -= 1
        ans = min(ans,left_facing_west+right_facing_east)
print(ans)
# Judge status: Wrong Answer
a,b,m = map(int, input().split())
a = list(map(int ,input().split()))
b = list(map(int, input().split()))
ticket = [list(map(int, input().split())) for _ in range(m)]
ans = []
for i in ticket:
  calc = 0
  calc = a[i[0]-1] + b[i[1]-1] - i[2]
  ans.append(calc)
#print(ans)
print(min(ans))
# Judge status: Accepted
def main():
    W, a, b = map(int, input().split())

    if (a + a + W)//2 < b:
        if b > a + W:
            print(b - (a + W))
        else:
            print(0)
    elif(a + a + W)//2 > (b + W):
        if a > (b + W):
            print(a - (b + W))
        else:
            print(0)
    else:
        print(0)
main()
# Judge status: Wrong Answer
import math

N = int(input())
A = list(map(int, input().split()))
# print(N, A)

for i in range(len(A)):
    A[i] -= (i + 1)

left = -abs(min(A))
right = abs(max(A))
minimum = right
# print(A, left, right)
for b in range(left, right + 1):
    sadness = 0
    for Ai in A:
        sadness = abs(Ai - b)

    minimum = min(sadness, minimum)

print(sadness)
# Judge status: Accepted
s=list(input())
a=s.count("a")
b=s.count("b")
c=s.count("c")
l1=[a,b,c]
l1.sort()
if l1[0]==0 and l1[1]==1 and l1[2]==1:
    print("YES")
elif min(a,b,c)!=0 and max(a,b,c)-min(a,b,c)<=1:
    print("YES")
elif a+b+c==max(a,b,c) and max(a,b,c)==1:
    print("YES")
else:
    print("NO")
# Judge status: Wrong Answer
(n,m)=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
a0 = sum(a)/(4*m)
m-=1
if a[m] > a0:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
n,k = map(int,input().split())
a = list(map(int,input().split()))
ans = -(-(n-1)//(k-1))
print(ans)
# Judge status: Wrong Answer
a = input()

if a.isupper:
  print("A")
else:
  print("a")
# Judge status: Wrong Answer
import sys 
read = sys.stdin.buffer.read
N,*X = map(int,read().split())
s = sum(X)
res = [(x-s)**2 for x in X]
print(sum(res))
# Judge status: Wrong Answer
s = input()
t = input()
ans = "".join([s[i] + t[i] for i in range(len(t))])
print(ans + s[-1]) if len(s) - len(s) == 1 else print(ans)
# Judge status: Accepted
n, k, s = map(int, input().split())
t = 10**9-1 if s == 10**9 else s+1
ans = [s]*k+[t]*(n-k)
print(*ans)
# Judge status: Wrong Answer
#!/usr/bin/env python3

from sys import stdin


def main():
    S = stdin.readline()
    if S == 'ABC':
        print('ARC')
    elif S == 'ARC':
        print('ABC')


if __name__ == "__main__":
    main()
# Judge status: Accepted
S,W = map(int,input().split())
if S>W:
  print("safe")
else:
  print("unsafe")
# Judge status: Wrong Answer
n=int(input())
A=list(map(int,input().split()))
for i in A:
  if i%2==0:
    if i%3!=0 or i%5!=0:
      print("DENIED");exit()
print("APPROVED")
# Judge status: Wrong Answer
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
d = [list(map(int, input().split())) for i in range(a[2])]
e = [b[0] + c[0]]
for f in d:
  e.append(b[f[0] - 1] + c[f[1] - 1] - f[2])
print(min(e))
# Judge status: Wrong Answer
N,Q=map(int,input().split())
S=input()
S=S.replace('AC','00')
for i in range(Q):
    a,b=map(int,input().split())
    print(S[a-1:b].count('00'))
# Judge status: Accepted
import math

N = int(input())
CSF = [list(map(int, input().split())) for _ in range(N - 1)]

for i in range(N - 1):
    t = CSF[i][0] + CSF[i][1]
    for ii in range(i + 1, N - 1):
        if t <= CSF[ii][1]:
            t = CSF[ii][1] + CSF[ii][0]
        else:
            t = CSF[ii][1] + CSF[ii][2] * math.ceil((t - CSF[ii][1]) / CSF[ii][2]) + CSF[ii][0]
    print(t)
print(0)
# Judge status: Wrong Answer
def main():
    from math import sqrt

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

    print('Yes' if sqrt(a) + sqrt(b) < sqrt(c) else 'No')


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
s=input()
n=len(s)
if s[n-1]!=s:
  s=s[0:n-1]+'s'
else:
  s=s[0:n-1]+'es'
print(s)
# Judge status: Accepted
n = int(input())
A = list(map(int,input().split()))
A.sort()
ls = []
pre = A[0]
cnt = 1
for i in range(n):
    if A[i] == pre:
        cnt+=1
    else:
        ls.append((pre,cnt))
        cnt = 1
    pre = A[i]
ls.append((pre,cnt))
ans = 0
pre = 0
for num,cnt in ls:
    if cnt>=2:
        if cnt>=4:
            ans = num**2
        else:
            ans = num*pre
        pre = num
print(ans)
# Judge status: Wrong Answer
n,x,t = [int(i) for i in input().split()]
print((int(n/x)+1)*t)
# Judge status: Wrong Answer
n = int(input())
l = list(map(int, input().split()))
k = []
k_2 = []
k_4 = []

for i in l:
    if i % 4 == 0:
        k_4.append(i)
    elif i % 2 == 0:
        k_2.append(i)
    else:
        k.append(i)


if len(k_4) >= len(k):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
#
from math import gcd


def main():
    k = int(input())
    total = 0
    for i in range(1, k + 1):
        for j in range(1, k + 1):
            g = gcd(i, j)
            for l in range(1, k + 1):
                total += gcd(g, l)
    print(total)


if __name__ == '__main__':
    main()
# Judge status: Accepted
n, k = map(int, input().split())
A = list(map(int, input().split()))
for i in range(k):
    B = [0] * (n+1)
    for j in range(n):
        B[max(0, j-A[j])] += 1
        B[min(n, j+A[j]+1)] -= 1
    A[0] = B[0]
    for j in range(1, n):
        A[j] = A[j-1]+B[j]
    if A == [n]*n:
        print(*A)
        exit()
print(*A)
# Judge status: Wrong Answer
import sys
from sys import stdin
input = stdin.readline

INF = 10**9

s = input()
t = input()
ans = INF
for i in range(len(s) - len(t) + 1):
  cnt = 0
  for j in range(len(t)):
    if (s[i+j] != t[j]): cnt += 1
  ans = min(cnt, ans)
print(ans)
# Judge status: Wrong Answer
n, a, b = map(int,input().split())

if n == 1:
    if a == b:
        print(1)
    else:
        print(0)
elif a >= b:
    print(0)
else:
    ans = (b-a)*(n-2)+1
    print(ans)
# Judge status: Accepted
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

a,b,c = inm()
print('Yes' if a+b<c and 4*a*b<(c-a-b)**2 else 'No')
# Judge status: Wrong Answer
S = input('input text:')
T = input('input text:')

print(S)
print(T)

calc = 0

for i in range(len(S)):
	if S[i] != T[i]:
		calc += 1

print(calc)
# Judge status: Accepted
N, K = list(map(int,input().split()))
A = list(map(int,input().split()))

root = [1]
setroot = set(root)

for i in range(N):
    if A[root[-1]-1] in setroot:
        start = root.index(A[root[-1]-1])
        break
    setroot.add(A[root[-1]-1])
    root.append(A[root[-1]-1])

roop = root[start:]

if K <= start:
    print(root[K])
else:
    print(root[(K-start)%len(roop)+start])
# Judge status: Wrong Answer
k, a, b = map(int, input().split())

if b/a <= 2 or k-(a-1) <= 0:
    ans = 1 + k
else:
    k = k - (a-1)
    ans=(b-a) * ((k//2)-1) + b + k%2
print(int(ans))
# Judge status: Accepted
x,y=map(int,input().split())
i=0
a=x*pow(2,i)
while a <= y:
  i+=1
  a=x*pow(2,i)
print(i)
# Judge status: Accepted
A,B,C = map(int,input().split())

print(max(A,B,C)*10 + min(A,B,C) + (A+B+C)-max(A,B,C)-min(A,B,C))
# Judge status: Wrong Answer
# ABC125C

from fractions import gcd
from functools import reduce

n = int(input())
a = list(set(map(int, input().split())))
print(a)
n = len(a)
if n == 1:
    print(a[0])
elif n == 2:
    print(max(a[0], a[1]))
else:
    max_value = 0
    for i in range(n):
        memo = a.pop(0)
        x = reduce(gcd, a)
        if x > max_value:
            max_value = x
        a.append(memo)
    print(max_value)
# Judge status: Wrong Answer
from math import *

def comTime(x):
  return ceil(x/10) * 10

def solve(_l):
  s = 0
  l =sorted(_l, key=lambda x: x % 10)
  s += sum(map(comTime,l[1:])) + l[0]
  return s
  
_l = [int(input()) for _ in range(5)]
print(solve(_l))
# Judge status: Wrong Answer
n=int(input())
if n==0:
  print(0)
  exit()
if n==1:
  print(1)
  exit()
ans=[]
while n!=1:
  r=n%(-2)
  ans.append(str(r))
  n=(n-r)//(-2)
ans.append(str(1))
ans.reverse()
print(''.join(ans))
# Judge status: Accepted
import math
import sys
a=int(input())
List=list(map(int,input().split()))
s=sum(List)
r=1
count=0
for i in range(a+1):
  count+=r
  r-=List[i]
  s-=List[i]
  if r<0:
    print(-1)
    sys.exit()
  r=min(s,2*r)
print(count)
# Judge status: Wrong Answer
d,t,s=map(int,input().split())
print("Yes" if s!=0 or t>=d/s else "No")
# Judge status: Accepted
from collections import Counter
n = int(input())
c = Counter()
ans = 0
for i, a in enumerate(map(int, input().split())):
    ans += c[i - a]
    c[a + i] += 1
print(ans)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int,input().split()))

A.sort()
b = set(A)
b = list(b)
b.reverse()


ans = []
count = 0

for i in b:
    if A.count(i) >= 4:
        print(i * 2)
    elif A.count(i) >= 2:
        count += 1
        ans.append(i)
        if count == 2:
            print(ans[0]*ans[1])
            exit()

print(0)
# Judge status: Accepted
#python3
from operator import itemgetter
def main():
    n = int(input())
    a = [int(i) for i in input().split()]
    s = []
    for i,j in zip(a,range(n)):
        s.append((i,j+1))
    for i in sorted(s, key=itemgetter(0)):
        print(i[1],end=" ")
main()
# Judge status: Accepted
n = int(input())
s = input()

sum_e=0
for tmp in s:
    if tmp=="E":
        sum_e+=1

ans=sum_e
for tmp in s:
    if tmp=="E":
        sum_e-=1
    else:
        sum_e+=1
    if ans > sum_e:
        ans=sum_e

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

if N * 2 < M:
    ans = N + (M - 2 * N) // 4
else:
    ans = min(N, M // 2)
print(ans)
# Judge status: Accepted
n,k = map(int, input().split())
s=input()

init=0
if s[0] == "L":
    init+=1
if s[-1]=="R":
    init+=1

for i in range(n-1):
    if s[i]=="R" and s[i+1]=="L":
        init+=2

init -= 2*k
if init <= 0:
    init=1
print(n-init)
# Judge status: Wrong Answer
n,k=map(int,input().split())
s=input()
p2=0
p1=0
if s[0]=="L":
  p1+=1
if s[n-1]=="R":
  p1+=1
  
for i in range(1,n):
  if not (s[i]=="L" and s[i-1]=="R"):
    continue
  p2+=1
if k<=p2-1:
  print(n-2*p2-p1+2*k)
elif p2<k<p2+p1:
  print(n-p1+(k-p2))
else:
  print(n-1)
# Judge status: Accepted
from collections import Counter

n = int(input())
a = list(map(int,input().split()))
ac = Counter(a)
an = len(ac)
a_mostcommon = ac.most_common()
cnt = 0
for i in range(an):
  num, count = a_mostcommon[i]
  if count > num:
    cnt += count - num
  elif count < num:
    cnt += count

print(cnt)
# Judge status: Accepted
# ABC150 A
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
k,x=nm()
if 500*k>=x:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
n = int(input())
t = [int(input()) for _ in range(n)]
ans = t[0]

for v in t:
    if ans % v != 0:
        if ans < v:
            ans *= (v // ans)
        else:
            ans += v

print(ans)
# Judge status: Wrong Answer
#入力例は合うがWAになる

S = input()
T = input()

# if [S[0],S[1],S[2]] == [T[2],T[1],T[0]]:
if [S[2],S[1],S[0]] == [T[0],T[1],T[2]]:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
arr= list(map(int,input().split()))

if arr[0]==0:
   print(1)
if arr[1]==0:
   print(1)
if arr[2]==0:
   print(1)
if arr[3]==0:
   print(1)
if arr[4]==0:
   print(5)
# Judge status: Accepted
n = int(input())
A = list(map(int,input().split()))

L = [0]*(n+2)
R = [0]*(n+2)
L[n] = A[n]
R[n] = A[n]

for i in range(n,-1,-1):
  L[i] = A[i] + (L[i+1]+1)//2
  R[i] = A[i] + R[i+1]
  
if L[0]>1:
  print(-1)
else:
  tmp = 1
  ans = 0
  for i in range(n+1):
    ans += tmp
    tmp -= A[i]
    tmp = min(tmp*2,R[i+1])    
  print(ans)
# Judge status: Wrong Answer
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
if N <= K:
    print(K*X)
else:
    print(K*X+Y*(N-K))
# Judge status: Wrong Answer
a,b = map(int,input().split())

answer = a * b

if a*b / 2 == a*b // 2:
    print("Even")
else:
    print("odd")
# Judge status: Accepted
N,X=map(int,input().split())
*A,=map(int,input().split())

B=[0]*N
for i in range(N):
    B[i] = A[i] if A[i]<=X else X

cnt=sum(A)-sum(B)    
for i in range(N-1):
    if X < B[i]+B[i+1]:
        d=B[i]+B[i+1]-X
        B[i+1]-=d
        cnt+=d
print(cnt)
# Judge status: Accepted
a = list(map(int,input().split()))
if a[0] + a[1] >= 24:
  print(a[0] + a[1] -24)
else:
  print(a[0] + a[1])
# Judge status: Accepted
def main():
    n = int(input())
    print('ABC' if n<=999 else 'ABD')

if __name__ == '__main__':
    main()
# Judge status: Accepted
S = int(input())
if S < 3:
    print(0)
else:
    MODULO = int(1e9+7)
    dp = [0,0,0,1]
    for i in range(4,S+1):
        x = dp[i-3] + dp[i-1]
        x %= MODULO
        dp.append(x)
    print(dp[-1])
# Judge status: Accepted
import itertools
N = int(input())
L = sorted(list(map(int,input().split())))
SS = itertools.combinations(L,3)
count = 0

for x,y,z in SS:
    if x + y > z and x + z > y and y + z > x and x != y != z:
        count += 1
print(count)
# Judge status: Wrong Answer
a, b = map(int, input().split())
print(a+b//24)
# Judge status: Wrong Answer
z=ord('z')
a=ord('a')
ss=input()
s=list(ss)
k=int(input())
l=len(s)

for i in range(l):
    if z-ord(s[i])+1<=k:
        k-=z-ord(s[i])+1
        s[i]='a'

if k>0:
    last=(ord(s[-1])+k-a)%26+a
    s[-1]=chr(last)

ans=''.join(s)
print(ans)
# Judge status: Wrong Answer
n,k=map(int,input().split())
p=list(map(int,input().split()))
#q=[x-1 for x in p]
ans=0
s=sum(p[:k])
for i in range(n-k):
  s=s+p[k+i]-p[i]
  ans=max(ans,s)
print(ans/2+k/2)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

ans = 0
cnt = 0
for i in range(n):
    if a[i] % 4 == 0:
        ans += 1
    elif a[i] % 2 == 0:
        cnt += 1
        if cnt % 2 == 0:
            ans += 1
    

if n // 2 <= ans:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
A, B = list(map(int,input().split()))
print(int((A+B)/2))
# Judge status: Accepted
from math import gcd
#リスト l の最大公約数
def gcdlist(l):
    a = l[0]
    for i in range(len(l)):
        a = gcd(a,l[i])
    return a
n = int(input())
A = list(map(int, input().split()))
ans = 0

x = [0]*n
y = [0]*n
for i in range(1, n):
    x[i] = gcd(x[i-1], A[i-1])
for i in reversed(range(n-1)):
    y[i] = gcd(y[i+1], A[i+1])

for i in range(n):
    tmp = gcd(x[i], y[i])
    ans = max(ans, tmp)

print(ans)
# Judge status: Accepted
from itertools import accumulate
from operator import add

N,K = map(int,input().split())
A = map(int,input().split()) 
for k in range(K):
    B = [0] * N
    for i,x in enumerate(A):
        L = max(0, i-x)
        R = min(N-1, i+x)
        B[L] += 1
        if R+1 != N:
            B[R+1] -= 1
    L = list(accumulate(B,add)) 
    #L = list(accumulate(B))[:]
    if L == A:
        break
    A = L
print(*A)
# Judge status: Wrong Answer
K = int(input())
str = list(input())

if len(str) <= K:
  print("".join(str))
else:
  print("".join(str[0:K]))
# Judge status: Wrong Answer
S: str = input()

for i in range(len(S)//2):
    if len(S[:-i]) % 2 != 0:
        continue

    pivot: int = (len(S)-i) // 2
    if S[:pivot] == S[pivot:-i]:
        print(pivot * 2)
        break
# Judge status: Accepted
N = int(input())

S = []
counter = 0
for i in range(N):
    S.append(input())

S = sorted(S)
for i in range(N-1):
    if S[i] == S[i+1]:
        counter += 1
print(N - counter)
# Judge status: Accepted
n, a, b = map(int, input().split())
def f(n): return a<=sum(int(i) for i in str(n))<=b
print(sum(i for i in range(1, n+1) if f(i)))
# Judge status: Accepted
n, y = map(int, input().split())

stop = n + 1
for m in range(stop):
    for g in range(stop - m):
        s = n - m - g
        if y == 10000 * m + 5000 * g + 1000 * s:
            print(m, g, s, sep=" ")
            break
    else:
        continue
    break
else:
    print("-1 -1 -1")
# Judge status: Wrong Answer
def fun(a):
    count=0
    max=0
    for i in a:
        if i=='R':
            count+=1
        
            if count>=max:
                max=count
            
    else:
        if count>=max:
            max=count
        count=0
    return max
# Judge status: Accepted
n, k = map(int, input().split())
p = list(map(int, input().split()))

if n != k:
    memo = [0] * (n + 1)

    for i in range(n):
        memo[i] = memo[i - 1] + p[i]

    ans = 0
    for i in range(k, n):
        ans = max(ans, memo[i] - memo[i - k])

    ans = (ans + k) / 2
    print(ans)
else:
    ans = (sum(p) + k) / 2
    print(ans)
# Judge status: Accepted
s=input()
if (s[0]=="A") and (s[2:-1].count("C")==1) and ("C" not in s[:2]) and (s[-1] != "C"):
  s=s[1:]
  s=s.replace("C","")
  if s==s.lower():
    print("AC")
  else:
    print("WA")
else:
    print("WA")
# Judge status: Accepted
x, a, b = map(int, input().split())

if a >= b:
    print("delicious")
else:
    if b - a <= x:
        print("safe")
    else:
        print("dangerous")
# Judge status: Accepted
n = int(input())
a,b = map(int, input().split())

c = 'NG'
for i in range(b-a+1):
  d = a + i
  if d % n == 0:
    c = 'OK'
    
  
print(c)
# Judge status: Accepted
s = input()
k = 1
for i in range(2):
  if s[i]==s[i+1]==s[i+2]:
    k = 0
if k:
  print("No")
else:
  print("Yes")
# Judge status: Wrong Answer
from sys import stdin


def get_result(data):
    A, B, C, K = data
    if (A + B) >= K:
        return A
    else:
        return A - (K-(A+B))


if __name__ == '__main__':
    data = list(map(int, stdin.readline().rstrip().split(' ')))
    result = get_result(data)
    print(result)
# Judge status: Accepted
# 2butan renshuu 0812

def f(m):
  cut=0
  for aa in a:
    cut+=(aa-1)//m
    if cut > k:
      return False
  return True

n,k=map(int,input().split())
a=list(map(int,input().split()))

l=0
r=10**9+1
while r-l>1:
  m=(l+r)//2
  # right move
  if f(m):
    r=m
  else:
    l=m

print(r)
# Judge status: Accepted
s = input()
s,n,e,w = s.count("S"),s.count("N"),s.count("E"),s.count("W")
if (s > 0 and n == 0) or (s == 0 and n > 0):
    print("No")
elif (e > 0 and w == 0) or (e == 0 and w > 0):
    print("No")
else:
    print("Yes")
# Judge status: Accepted
a,b = map(int,input().split())

for i in range(b):
    sum_tap = a*i-(i-1)
    if sum_tap>=b:
        print(i)
        break
# Judge status: Wrong Answer
n, m = map(int, input().split())
h = list(map(int, input().split()))
ans = [1] * n
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    if h[a] < h[b]:
        ans[a] = 0
    elif h[a] > h[b]:
        ans[b] = 0

print(sum(ans))
# Judge status: Wrong Answer
def resolve():
    a, b, c, d = list(map(int, input().split()))
    ans = -10 ** 9

    for x in (a, b):
        for y in (c, d):
            ans = max(ans, x * y)
    if (b == 0 and d > 0) or (b > 0 and d == 0):
        ans = 0

    print(ans)

resolve()
# Judge status: Accepted
A, B, C, D = (x for x in input())

OP = ('+', '-')

def solve():
  for op1 in OP:
    for op2 in OP:
      for op3 in OP:
        formula = A + op1 + B + op2 + C + op3 + D
        if eval(formula) == 7:
          return formula + '=7'

print(solve())
# Judge status: Accepted
import sys
S = input()
maxer = 0
count = 0
for i in range( len(S) ):
    if S[i] == "A" or S[i] == "C" or S[i] == "G" or S[i] == "T":
        count += 1
        if maxer < count:
            maxer = count
    else:
        count = 0
print( maxer )
# Judge status: Accepted
n = int(input())
x = 10**13
for i in range(1,int(n**.5)+1):
    if n%i == 0:
        x = min(x,n//i+i-2)
print(x)
# Judge status: Wrong Answer
s=input()
li=list(input())

min = 100000000

w = 0

for index, i in enumerate(li):
  a = 0
  if i == 'W':
    w += 1
  
  s = li[index + 1:].count('E')

  a = w + s
    
  if min > a:
    min = a
    
print(min)
# Judge status: Wrong Answer
import heapq
N, M = map(int, input().split())
A = [-int(i) for i in input().split()]
heapq.heapify(A)
for i in range(M):
    max_ = heapq.heappop(A)
    max_ = -max_//2
    heapq.heappush(A, max_)
print(-sum(A))
# Judge status: Accepted
import math
n = int(input())
arr = [int(x) for x in input().split()]

dp = [0]*n
for i in range(n):
    if i>=2:
        dp[i] = min(dp[i-1]+abs(arr[i]-arr[i-1]),dp[i-2]+abs(arr[i-2]-arr[i]))
    elif i==1:
        dp[i] = abs(arr[i]-arr[i-1])
    else:
        dp[i] = 0
print(dp[n-1])
# Judge status: Accepted
import numpy as np

N = int(input())
# a = np.array([int(i) for i in input().split()])
a = np.array([input().split() for i in range(N)], dtype=int)

dp = np.zeros((N, 3), dtype=int)
dp[0] = a[0]

for i in range(1, N):
    for j in range(3):
        for k in range(3):
            if j == k:
                continue
            dp[i][k] = max(dp[i][k], dp[i-1][j] + a[i][k])

print(np.max(dp[-1]))
# Judge status: Accepted
# %%
K, N = map(int, input().split())
A = list(map(int , input().split(" ")))

# %%
ma = 0
for i in range(N-1):
    ma = max(ma, A[i+1]- A[i])

# %%
print(min(K-ma,A[N-1]-A[0]))

# %%
# Judge status: Wrong Answer
import math
r=int(input())
s=(r*r) * math.pi
print(math.floor(s // math.pi))
# Judge status: Accepted
n=int(input())
ans=1
while ans<=n:
    ans*=2
ans//=2
print(ans)
# Judge status: Accepted
n, m = map(int, input().split())
a = 0; b = n+1
for _ in range(m):
    l, r = map(int, input().split())
    a = max(a, l)
    b = min(b, r)
print(max(0, b-a+1))
# Judge status: Wrong Answer
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))

A_cs = A.cumsum()
A_cs = A_cs - A_cs[-1]/2

print(int(A_cs[np.abs(A_cs).argmin()]*2))
# Judge status: Accepted
A, B, C = sorted(map(int,input().split()))

if A == B and A == C:
    print(0)
    exit()
cnt = 0
cnt += (C - A) // 2
A = ((C - A) // 2) * 2 + A
cnt += (C - B) // 2
B = ((C - B) // 2) * 2 + B

if A == B and A == C:
    print(cnt)
elif A == B and A != C:
    print(cnt+1)
else:
    print(cnt+2)
# Judge status: Accepted
N=int(input())
A=int(input())
val=N%500
if val<=A:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n = int(input())

for i in range(3):
	if "7" in str(n):
		print("Yes")
		break
	else:
		print("No")
		break
# Judge status: Accepted
n = int(input())
A = tuple(map(int, input().split()))

CO = [0] * 8
o32 = 0
for a in A:
    if a >= 3200:
        o32 += 1
        continue
    for i in range(8):
        if 4*i*100 <= a < 4*(i+1)*100: 
            CO[i] += 1
ans = 0
for count in CO:
    if count > 0:
        ans += 1
print(1 if ans==0 else ans, ans+o32)
# Judge status: Accepted
# B - Varied
S = input()
s = set()
ans = 'yes'
for i in range(len(S)):
    if S[i] in s:
        ans = 'no'
        break
    s.add(S[i])
print(ans)
# Judge status: Accepted
import math
R = int(input())
L = math.pi*2*R
print(L)