peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
import math

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

if 2 *x <= a ** 2 * b:
    p1 = a * b ** 2
    p2 = 2 * x
else:
    p1 = 2 * (a ** 2 * b - x)
    p2 = a ** 3

sit = math.atan(p1 / p2)
print(math.degrees(sit))
# Judge status: Wrong Answer
n = int(input())
s = input()
if n%2==1:
    print('No')
    exit(0)

if s[:n//2] == s[:-n//2]:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
N = int(input())
A = [int(x) for x in input().split()]

SUM = sum(A)
ans = 0

for i in range(N+1):
    SUM -= A[i]
    if i == 0:
        res = min(1 - A[0], SUM)
    else:
        res = min(2*B-A[i], SUM)
    if res < 0:
        ans = -1
        break
    ans = ans + res + A[i] 
    B = res
    
print(ans)
# Judge status: Wrong Answer
import math
N, K = input().split(" ")
print(math.ceil(math.log(int(N),int(K))))
# Judge status: Accepted
import sys
input=sys.stdin.readline
n=int(input())
ac,wa,tle,re=0,0,0,0
for _ in range(n):
    s=input().rstrip()
    if s=='AC':
        ac+=1
    elif s=='WA':
        wa+=1
    elif s=='TLE':
        tle+=1
    else:
        re+=1

print('AC x %d' % ac)
print('WA x %d' % wa)
print('TLE x %d' % tle)
print('RE x %d' % re)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
judge = True
for i in range(n-1):
    if a[i]%2 == 0:
        if(a[i]%3 != 0 and a[i]%5 != 0):
            judge = False
            break
if judge:
    print('APPROVED')
else:
    print('DENIED')
# Judge status: Wrong Answer
s=input()
k=int(input())
for i in range(len(s)):
	if i+1==k:
		break
		exit()
	if s[i]!="1":
		print(s[i])
		exit()
print(1)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
print("Yes" if a*b+b*c+c*a<(a**2+b**2+c**2)/2 else "No")
# Judge status: Wrong Answer
N = input()

if "9" in N:
    print( "YES" )
else:
    print( "NO" )
# Judge status: Accepted
n = list(map(int,input().split()))
if n[0]*-1+n[1]*-1+n[2]>0:
    if (n[0]*-1+n[1]*-1+n[2])**2 > 4*n[0]*n[1]:
        print("Yes")
    else:
        print("No")
else:
    print("No")
# Judge status: Accepted
n = int(input())
b = list(map(int , input().split()))
a = [b[0]] + b
for i in range(1 , n - 1):
  a[i] = min(b[i - 1] , b[i])
print(sum(a))
# Judge status: Wrong Answer
x, a, b = map(int, input().split())
print('B' if abs(b-x) < abs(b-a) else 'A')
# Judge status: Wrong Answer
a,b,c = map(int,input().split())

if a != b != c:
    print(3)
if a == b and a != c and b != c: 
    print(2)
if b == c and b != a and c != a:
    print(2)
if a == b == c:
    print(1)
# Judge status: Wrong Answer
n = input()
 
if n[0] == 9 or n[1] == 9:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
a = list(map(int, input().split()))
print('bust' if sum(a) >= 22 else 'win')
# Judge status: Accepted
N = int(input())

for i in range(N,1000):
  i = str(i)
  if i[0] == i[1] and i[1] == i[2] and i[2] == i[0]:
    ans = i
    break
    
print(i)
# Judge status: Accepted
X = int(input())

for A in range(1000):
    for B in range(-1000, 1000):
        if A ** 5 - B ** 5 == X:
            print(A, B)
            exit()
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

A.sort()
A_max = A[-1]

checked = [False] * (A_max+1)
ans = 0
for i in range(N):
    if i < N-1:
        if A[i] == A[i+1]:
            for j in range(A[i], A_max+1, A[i]):
                checked[j] = True
    if checked[A[i]]:
        pass
    else:
        ans += 1
        for j in range(A[i], A_max+1, A[i]):
            checked[j] = True

print(ans)
# Judge status: Wrong Answer
def resolve():
    '''
    code here
    '''
    S = int(input())

    a, b = divmod(S, 10**9)
    x2 = 10**9 - b
    y2 = (S+x2) // (10**9)

    print(0,0, 10**9, 1, x2, y2)

if __name__ == "__main__":
    resolve()
# Judge status: Wrong Answer
from collections import Counter

MOD = 998244353

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

counter = Counter(D)
# print("counter: {}".format(counter))

ans = 1
count = 0
for i, item in enumerate(sorted(counter.items(), key=lambda x: x[0])):
    # print("ans: {}".format(ans))
    # print("i: {}, item: {}".format(i, item))
    if i != item[0]:
        ans = 0
        break
    if i == 0:
        count = item[1]
    else:
        ans *= count ** item[1]
        count = item[1]
print(ans % MOD)
# Judge status: Wrong Answer
n = int(input())
list = [int(i) for i in input().split()]
total = 0
ans = []
for i in range(n):
    total = total ^ list[i]

print(total)
for j in range(n):
    ans.append(str(total^list[j]))
print(" ".join(ans))
# Judge status: Accepted
n,a,b=map(int,input().split())
ans=0
for i in range(1,n+1):
    im=i
    count=[]
    for j in range(37):
        count.append(i%10)
        i=i//10
    csum=sum(count)
    if a<=csum and csum<=b:
        #print(csum)
        ans+=im
print(ans)
# Judge status: Wrong Answer
X = int(input())

for i in range(1, int(X**0.5)+1):
  if X/i == X//i:
    X += 1
    continue

    
else:
  print(X)
# Judge status: Accepted
N=int(input())
a=list(map(int,input().split()))
mi=0
ma=0
l=[]
count=0
for i in range(N):
 if a[i]<3200:
  l.append(a[i]//400)
 else:
  count=count+1

print(max(1,len(set(l))),max(1,len(set(l))+count))
# Judge status: Wrong Answer
n,w=map(int,input().split())
wv=[list(map(int,input().split())) for _ in range(n)]
dp=[[0]*(w+1) for _ in range(n+1)]
for i in range(1,n+1):
	for j in range(1,w+1):
		if wv[i-1][0]+j>w:
			dp[i][j]=dp[i-1][j]
		else:
			dp[i][j]=max(dp[i-1][j],dp[i-1][j-wv[i-1][0]]+wv[i-1][1])
print(max(max(dp)))
# Judge status: Accepted
n,*a=map(int,open(0).read().split())
A=sum(a)
ans=1
now=1
for i in a:
    A-=i
    now=min((now-i)*2,A)
    ans+=now
    if now<0:
        print(-1)
        exit()
print(ans)
# Judge status: Wrong Answer
N = int(input()) 
num = N // 11
res = 0
k = 0
res = num * 2
k = num * 11
if N % 11 == 0:
  pass
else:
  res +=  1
  k += 5
  if k < N:
    res +=  1
    k += 6
print(res)
# Judge status: Accepted
N = int(input())

counter = [[0]*10 for _ in range(10)]

# 先頭末尾の組み合わせを数える
for i in range(1,N+1):
    x = str(i)
    counter[int(x[0])][int(x[-1])] += 1

ans = 0

# (先頭末尾)と(末尾先頭)の組み合わせ
for i in range(10):
    for j in range(10):
        ans += counter[i][j] * counter[j][i]
        
print(ans)
# Judge status: Accepted
def main():
    A, B = map(int, input().split())
    for i in range(1, 2000):
        if int(i*0.08) == A and int(i*0.1) == B:
            print(i)
            return
    print(-1)


if __name__ == "__main__":
    main()
# Judge status: Accepted
a,b,c,d=map(int,input().split())

print("Yes" if ((abs(a-b)<=d and (abs(c-b)<=d)) or abs(c-a)<=d) else "No")
# Judge status: Wrong Answer
A,B,C = map(int, input().split())

if (A == 5 and B == 5 and C == 7) or (A == 5 and B == 7 and C == 5) or (A == 7 and B == 5 and C == 5):
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
n = int(input())
a = input()
cr = 0
cl = 0
ans = a
for i in range(n):
  if a[i] == "(":
    cl += 1
  elif a[i] == ")":
    cr += 1
  if cl == 0 and cr != 0:
    ans = "(" + ans
    cr -= 1
  if cl != 0 and cr != 0:
    if cr >= cl:
      cr -= cl
      cl -= cl
    else:
      cr -= cr
      cl -= cr
if cl != 0:
  for i in range(cl):
    ans = ans+")"
print(ans)
# Judge status: Accepted
a,b,c,d = map(int, input().split())
alice = set(i for i in range(a,b+1))
bob = set(j for j in range(c,d+1))
s = alice & bob
print(max(len(alice & bob) - 1, 0))
# Judge status: Accepted
# coding: utf-8

import sys
import math
import collections
import itertools
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def PL(L) : print(*L, sep="\n")

weeks = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

S = input()
d = weeks.index(S)

print(7 - d)
# Judge status: Wrong Answer
P=int(input())
X=list(map(int,input().split()))
l=[]
for j in range(min(X)-1,max(X)):
    ans = [(i-j)**2 for i in X ]
    l.append(sum(ans))
print(min(l))
# Judge status: Accepted
N,K = map(int,input().split())
R,S,P = map(int,input().split())
T = list(input())

Pred = []
dp = []

for i in range(K,N):
    if(T[i] == T[i-K]):
        T[i] = 'x'
    else:
        continue

x = T.count('r')
y = T.count('s')
z = T.count('p')

print(P * x + R * y + S * z)
# Judge status: Wrong Answer
import numpy as np

N,M = list(map(int,input().split()))
a = np.array([input().split() for i in range(M)])
a = [int(i) for i in a.reshape(-1)]
all_type = set(a)

for i in all_type:
	print(a.count(i))
# Judge status: Accepted
N=int(input())
S=[input() for i in range(N)]
C0=str(S.count("AC"))
C1=str(S.count("WA"))
C2=str(S.count("TLE"))
C3=str(S.count("RE"))
print("AC x "+C0)
print("WA x "+C1)
print("TLE x "+C2)
print("RE x "+C3)
# Judge status: Accepted
mod = 10**9+7

N = int(input())
a = 1
b = 1
c = 1
for _ in range(N):
    a *= 10
    b *= 9
    c *= 8
    a %= mod
    b %= mod
    c %= mod

ans = (a -2*b + c)%mod
print(ans)
# Judge status: Accepted
n=int(input())

if n<=111:
  print(111)
  
elif n<=222:
  print(222)
  
elif n<=333:
  print(333)
  
elif n<=444:
  print(444)
  
elif n<=555:
  print(555)
  
elif n<=666:
  print(666)
  
elif n<=777:
  print(777)
  
elif n<=888:
  print(888)
  
else:
  print(999)
# Judge status: Accepted
A,B,C=map(int,input().split())
if (A<=C)and(C<=B):
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
s = list(input())
k = int(input())
if len(s) <= 1:
    print(s[0])
else:
    if s[0] == '1':
        print(s[1])
    else:
        print(s[0])
# Judge status: Wrong Answer
from collections import Counter

s=Counter(input())
print("NO")
# Judge status: Accepted
n,k = map(int,input().split())
x = n-k
if x%(k-1) == 0:
    print(x//(k-1)+1)
else:
    print(x//(k-1)+2)
# Judge status: Accepted
n,k=map(int,input().split())
if n%k==0:
    print('0')
else:
    print('1')
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-

_in = input()

# if True:
#     print(_in)
# else:
#     print(_in)

print(_in[0:2])
# Judge status: Accepted
n=int(input())
min1=11**15
for i in range(5):
    a=int(input())
    min1=min(min1,a)
print(-(-n//min1)+4)
#切り上げ
# Judge status: Wrong Answer
a, b = map(int, input().split())

for k in range(1, 1000):
    x = (((k-1)*k*b - k*(k+1)*a)/2)/(b-a)
    if x % 1 == 0:
        print(int(x))
        break
# Judge status: Wrong Answer
a, b, c = map(int, input().split())

if b>=c and (a <= c):
    print("YES")
else:
    print("NO")
# Judge status: Accepted
if __name__ == '__main__':
	N, R = map(int, input().split())

	if N < 10:
		R += 100 * (10-N)

	print(R)
# Judge status: Accepted
x = int(input())
if x >= 2000:
  print(1)
else:
  n = x // 100
  d = x % 100
  if n * 5 >= d:
    print(1)
  else:
    print(0)
# Judge status: Accepted
import sys
from bisect import bisect_left

input = sys.stdin.readline


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

    L.sort()
    ans = 0
    for i in range(N - 2):
        a = L[i]
        for j in range(i + 1, N - 1):
            k = bisect_left(L, a + L[j])
            ans += (k - 1 - j)

    print(ans)


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
x,y=map(int,input().split())
group_A=[1,3,5,7,8,10,12]
group_B=[4,6,9,11]
if x in group_A ==True and y in group_A ==True:
  print("Yes")
elif x in group_B == True and y in group_B ==True:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
N = int(input())
H_list = list(map(int, input().split()))
con_cnt = 0
max_con = 0
for i in range(1, N):
    if H_list[i-1]>=H_list[i]:
        con_cnt += 1
    else:
        if max_con < con_cnt:
            max_con = con_cnt
        con_cnt = 0
if max_con < con_cnt:
            max_con = con_cnt
print(max_con)
# Judge status: Wrong Answer
s = input()
x = ""
for i in range(len(s) - 1):
    if s[i] == "0" and s[i+1] != "B":
        x += "0"
    elif s[i] == "1" and s[i+1] != "B":
        x += "1"
if s[-1] == "0":
    x += "0"
elif s[-1] == "1":
    x += "1"
print(x)
# Judge status: Accepted
print("YNeos"[len(set(input()))!=3::2])
# Judge status: Wrong Answer
N = input()

ret = 0
up = 0

for r in N[::-1]:
  m = int(r)
  ret += min(10 - m, m)
  if (10 - m) < m:
    up = 1

print(ret + up)
# Judge status: Accepted
#create date: 2020-03-28 21:04

import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    k, n = na()
    a = na()
    lmax = a[0] + (k-a[-1])
    for ai, aj in zip(a[0:-1], a[1:]):
        lmax = max(lmax, (aj-ai))
    print(k-lmax)

if __name__ == "__main__":
    main()
# Judge status: Accepted
N=int(input())
for i in range(int(N**0.5)+1):
    if N>=i**2:
        ans=i**2
    else:
        break
print(ans)
# Judge status: Accepted
s = input()
s = set(s)
for i in range(ord('a'), ord('z') + 1):
    t = chr(i)
    if t not in s:
        print(t)
        break
else:
    print('None')
# Judge status: Accepted
from bisect import *
N = int(input())
L = sorted(map(int,input().split()))
a = 0

for i in range(N):
  for j in range(i+1,N):
    a+=bisect_left(L,L[i]+L[j])-(j+1)
    
print(a)
# Judge status: Wrong Answer
N = int(input())

A = []
for i in range(N):
    A.append(list(map(int, input().split())))

A.sort(key=lambda x: (x[1], x[0]))

gokei = 0
for i in A:
    gokei += i[0]
    if gokei > i[1]:
        print("No")
else:
    print("Yes")
# Judge status: Accepted
A,B=map(int,input().split())
if (A+B)%2==0:
    print(int((A+B)/2))
else:
    print("IMPOSSIBLE")
# Judge status: Wrong Answer
x = input()
x = '000'+x
z = x[:-2]
y = x[-2:]
s = 0
z = int(z)
y = int(y)
L = []
for i in range(1,15):
    s +=5
    if s>=y and z>=i:
        print(1)
        exit()
if z>=20:
    print(1)
    exit()
print(0)
# Judge status: Accepted
x, y = map(int, input().split())
if x*y>=0:
    if x<y:
        print(y-x)
    else:
        print(x-y+2 if x*y>0 else x-y+1)
else:
    print(abs(abs(x)-abs(y))+1)
# Judge status: Wrong Answer
def main():
    _ = int(input())
    A = [int(i) for i in input().split()]
    from collections import Counter
    c = Counter(A)
    li = [(k, v) for k, v in c.items() if v >= 2]
    if li and li[0][1] >= 4:
        print(li[0][0] * li[0][0])
    elif len(li) <= 1:
        print(0)
    else:
        print(li[0][0] * li[1][0])


if __name__ == '__main__':
    main()
# Judge status: Accepted
from collections import deque
 
S = input()
Q = int(input())
S = deque(S)


flg_reverse = False
for q in range(Q):
  _ = input()
  if _[0] == '1':
    flg_reverse = flg_reverse ^ True
  else:
    _T, _F, _C = _.split()
    if (_F == '1') ^ flg_reverse:
      S.appendleft(_C)
    else:
      S.append(_C)        

S = list(S)
# reverseの部分を対応
if flg_reverse:
  S.reverse()

print(''.join(S))
# Judge status: Accepted
import math
r = int(input())
print(2 * r * math.pi)
# Judge status: Wrong Answer
from fractions import Fraction
N , K = list(map(int,input().split()))
denom_list = []
Z=0


def detame_keisan( N , K , i ):
    kijun = K
    score = i
    count = 0
    
    while score < kijun:
        count += 1
        score = ( score *  2 )
        
        print(count)
    return N * (2 ** count)

for i in range( 1,N+1 ):
    X = detame_keisan( N , K , i)
    denom_list.append( X )

for item in denom_list:
    #Z += 1/item
    Z += Fraction(1, item)
#print( Z)
print( float( Z.numerator / Z.denominator ))
# Judge status: Accepted
N = int(input())
X = [chr(ord('a') + i) for i in range(N)]
first_presence = {x: i for x, i in zip(X, list(range(N)))}

R = ['a']
for i in range(1, N):
    next_r = []
    for r in R:
        max_s = max(r)
        for x in X[:first_presence[max_s] + 2]:
            next_r.append(r + x)
    R = next_r

ans = R
ans.sort()
print(*ans, sep="\n")
# Judge status: Accepted
o = input()
e = input()
if len(o)==len(e):
    for i in range(len(o)):
        print(o[i]+e[i],end="")
else:
    for i in range(len(o)-1):
        print(o[i]+e[i],end="")
    print(o[-1])
# Judge status: Accepted
N, K = map(int, input().split())
S = str(input())
K -= 1
print(S[:K] + S[K].lower() + S[K + 1:])
# Judge status: Wrong Answer
s = list(input())
n = len(s)

s1 = [0]*n
s2 = [1]*n
for i in range(1,n,2):
  s1[i] = 1
  s2[i] = 0

count1 = 0
count2 = 0
for i in range(n):
  if s[i]!=s1[i]: count1 += 1
  if s[i]!=s2[i]: count2 += 1
print(min(count1,count2))
# Judge status: Wrong Answer

r = int(input())
s =  r*r*3.14
b = s / 3.14
print(int(b))
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

M = 10**6 + 1

cnt = [0] * M

for a in A:
    if cnt[a] != 0:
        cnt[a] += 1
        continue
    for b in range(a, M, a):
        cnt[b] += 1

ans = 0
for a in A:
    if cnt[a] == 1:ans += 1

print(ans)
# Judge status: Accepted
pi = 3.141592653589793
r = float(input())
print(2*r*pi)
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))
bits = [0] * 60
MOD = 10**9 + 7

for a in A:
    div = a
    i = 0
    while True:
        div, mod = div // 2, div % 2
        bits[i] += mod
        i += 1
        if div == 0:
            break

ans = 0
for i in range(60):
    ans += bits[i] * (n-bits[i]) * 2 ** i % MOD
print(ans % MOD)
# Judge status: Accepted
n = int(input())

ans = "No"

for i in range(1, 10):
    if n % i == 0:
        nn = n // i
        if nn < 10:
            ans = "Yes"
            break

print(ans)
# Judge status: Wrong Answer
def solve():
    s = input()
    s = s.replace('hi', '00')
    if len(s) == 1:
        return 'No'
    if len(s) == 2:
        return 'Yes' if s == '00' else 'No'
    # 3以上
    ans = 'No'
    for i in range(len(s)-2):
        if s[i] + s[i+1] == '00' and s[i+2] != 'i':
            ans = 'Yes'
            
    if s[-1] + s[-2] == '00':
        ans = 'Yes'
    
    return ans

print(solve())
# Judge status: Accepted
s_x,s_y,t_x,t_y=map(int,input().split())

ans=''

hor = t_x - s_x
ver = t_y - s_y

ans='U'*ver + 'R'*hor + 'D'*ver + 'L'*hor + 'L' + 'U'*(ver+1) +'R'*(hor+1)+'D'+'R' + 'D'*(ver+1)+'L'*(hor+1)+'U' 

print(ans)
# Judge status: Accepted
from collections import deque
from sys import stdin
nii=lambda:map(int,stdin.readline().split())

n,m=nii()

tree=[[] for i in range(n)]
for i in range(m):
  a,b=nii()
  a-=1
  b-=1
  tree[a].append(b)
  tree[b].append(a)

ans=[-1 for i in range(n)]
ans[0]=0

dq=deque()
dq.append(0)
while dq:
  x=dq.popleft()
  for i in tree[x]:
    if ans[i]==-1:
      ans[i]=x
      dq.append(i)

print('Yes')
for i in ans[1:]:
  print(i+1)
# Judge status: Accepted
n, k = map(int, input().split())
a = list(map(int, input().split()))

p = 0
cnt= 0

while p < n - 1:
    p += k - 1
    cnt += 1
print(cnt)
# Judge status: Accepted
import math

R = int(input())

print(2*R*math.pi)
# Judge status: Accepted
x=list(map(int,input().split()))
x.sort()
print(x[-1]*10+x[-2]+x[-3])
# Judge status: Accepted
k,a,b=map(int,input().split())
if b-a<=2 or a>k-1: print(k+1)
else:
    k-=a-1
    print(a+(b-a)*(k//2)+k%2)
# Judge status: Wrong Answer
N, K = map(int,input().split())
S = input()
OOMOJI = S[K-1]
KOMOJI = (S[K-1]).lower()
output_S = S.replace(OOMOJI, KOMOJI)
print(output_S)
# Judge status: Accepted
from fractions import gcd
P = 10**9 + 7
N = 1000001 #使う最大値+1以上にする、値に注意3*10^5とかにしとくと安心
inv = [0] + [1] # 1/x
for i in range(2,N):
  inv += [inv[P % i] * (P - int(P / i)) % P]
n=int(input())
a=list(map(int,input().split()))
lcm=a[0]
mod=10**9+7
for i in range(1,n):
  lcm=(lcm//gcd(lcm,a[i]))*a[i]
ans=0
lcm%=mod
for i in range(n):
  ans=(ans+lcm*inv[a[i]])%mod
print(ans%mod)
# Judge status: Accepted
import bisect

N = int(input())
H = []
for _ in range(N):
    a = int(input())
    ind = bisect.bisect_right(H, -a)
    if ind == len(H):
        H.append(-a)
    else:
        H[ind] = -a
print(len(H))
# Judge status: Accepted
N,M= map(int, input().split())
X= list(map(int, input().split()))

X.sort()

if N >= M:
    print(0)

elif N == 1:
    print(abs(max(X) - min(X)))

else:
    load = [X[i] - X[i - 1] for i in range(1, M)]
    load.sort()
    print(sum(load[:M - N]))
# Judge status: Accepted
N=int(input())
print(800*N-200*(N//15))
# Judge status: Accepted
import numpy as np
x, y, a, b, c = map(int,input().split())
p = np.array(input().split(),dtype=int)
q = np.array(input().split(),dtype=int)
r = np.array(input().split(),dtype=int)
p = np.sort(p)[::-1]
q = np.sort(q)[::-1]
ans = 0
kouho = []

for i in range(x):
    kouho.append(p[i])
for i in range(y):
    kouho.append(q[i])
for i in range(c):
    kouho.append(r[i])
kouho = sorted(kouho)[::-1]

for i in range(x+y):
    ans += kouho[i]

print(ans)
# Judge status: Accepted
import sys
from heapq import heappush, heappop
#input = sys.stdin.readline

def main():
    n=int(input())
    h=list(map(int,input().split()))
    ans=0
    for i in range(1,n):
        if h[n-1-i]-h[n-i]>=2:
            ans=1
            break
        elif h[n-1-i]-h[n-i]==1:
            h[n-i-1]-=1
    if ans==1:
        print('No')
    else:
        print('Yes')

if __name__ == '__main__':
    main()
# Judge status: Accepted
from sys import stdin, setrecursionlimit

setrecursionlimit(10 ** 9)


def input():
    return stdin.readline().strip()

N, K = map(int, input().split())

s = set()
for i in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    s |= set(A)

ans = set(range(1, N+1)) - s
print(len(ans))
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
cnt=0
for i in range(1,n):
  if a[i]<a[i-1]:
    cnt+=a[i-1]-a[i]
    a[i]=a[i-1]
    cnt+=a[i-1]-a[i]
print(cnt)
# Judge status: Wrong Answer
a,b=map(int,input().split());print(min(a,b))
# Judge status: Accepted
import sys
sys.setrecursionlimit(2 * 10 ** 5)
k = int(input())

r = []

MAX = 3234566667

def dfs(x):
    s = str(x)
    r.append(x)
    last = int(s[-1])
    for i in range(last-1, last+2):
        if 0 <= i <= 9:
            next = int(s + str(i))
            if next <= MAX:
                dfs(next)

dfs(1)
dfs(2)
dfs(3)
dfs(4)
dfs(5)
dfs(6)
dfs(7)
dfs(8)
dfs(9)

r.sort()
print(r[k-1])
# Judge status: Accepted
def dv(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors
A,B,K = map(int,input().split())
C = list(set(dv(A))&set(dv(B)))
C.sort()
C.reverse()
print(C[K-1])
# Judge status: Accepted
n = int(input())
ans_list = [[0] * 10 for i in range(10)]
for i in range(1, n+1):
  sn = str(i)
  a = int(sn[0])
  b = int(sn[-1])
  ans_list[a][b] += 1
ans = 0
for i in range(1, 10):
  for j in range(1, 10):
    ans += ans_list[i][j] * ans_list[j][i]
print(ans)
# Judge status: Accepted
N = int(input())
V = list(map(int, input().split()))

V.sort()

ans = 0
ans += V[0]/(2**(N-1))

for i in range(1,N):
  ans += V[i]/(2**(N-i))

print(ans)
# Judge status: Accepted
def print0():
    print(0)
    exit()

n = int(input())
d = list(map(int, input().split()))
mod = 998244353
ans = 1
maxd = max(d)
numcnt = [0] * (maxd + 1)
for i in d:
    numcnt[i] += 1
if not d[0] == 0 or not numcnt[0] == 1:
    print0()
for i in range(1, maxd + 1):
    if numcnt[i] == 0:
        print0()
    ans *= pow(numcnt[i - 1], numcnt[i], mod)
    ans %= mod
print(ans)
# Judge status: Accepted
print(len(set(list(map(int, input().split())))))
# Judge status: Accepted
from collections import Counter
n = int(input())
s = [input() for i in range(n)]
num = Counter(s)
mx = max(num.values())
T = []
for n in sorted(num):
    if num[n] == mx:
        print(n)
# Judge status: Accepted
x, a, b = map(int, input().split())

if a < b:
    if b - a <= x:
        print("safe")
    else:
        print("dangerous")
else:
    print("delicious")
# Judge status: Accepted
S = input()
print('Yes' if S[0] == S[1] == S[2] or S[1] == S[2] == S[3] else 'No')
# Judge status: Accepted
l = [int(input()) for i in range(6)]
out = 0
for i in range(4):
    for j in range(5):
        if l[j]-l[i] > l[5]:
            out += 1
if out > 0:
    print(":(")
else:
    print("Yay!")