Harryxun/stf_run huggingface dataset:
A, B, H, M = map(int, input().split())
w_a = 2*pi/(12*60.0)
w_b = 2*pi/(60.0)
theta_a = w_a*(H*60+M)
theta_b = w_b*M
ans = sqrt(A**2+B**2-2*A*B*cos(theta_a-theta_b))
print("{:.20f}".format(ans))

### FIXED CODE ###

from math import pi, cos,  sqrt
A, B, H, M = map(int, input().split())
w_a = 2*pi/(12*60.0)
w_b = 2*pi/(60.0)
theta_a = w_a*(H*60+M)
theta_b = w_b*M
ans = sqrt(A**2+B**2-2*A*B*cos(theta_a-theta_b))
print("{:.20f}".format(ans))
mod = 10 ** 9 + 7

class Solution:
    def FactorialMod(self, n):
        if n <= 1:
            return 1
        else:
            return n * self.FactorialMod(n - 1) % mod
    def ModInv(self, p):
        if p <= 1:
            return 1
        return (-self.ModInv(mod % p) * (mod // p)) % mod
    def FactorialModInv(self, p):
        if p <= 1:
            return 1
        return modinv_table[p] * self.FactorialModInv(p - 1)
    def Solve(self, n):
        ans = 0
        #Fill in the modinv_table
        for p in range(2, n + 1):
            modinv_table[p] = (-modinv_table[mod % p] * (mod // p)) % mod
        # print(modinv_table)
        for item in range(1, max_items + 1):
            print("----------------------------------")
            print("item", item)
            max_value = S - 3 * item
            print("max_value", max_value)
            add = self.CalculateAddition(max_value, item)
            print("add", add)
            ans += add
            ans %= mod
        return ans
    def CalculateAddition(self, max_value, item):
        if max_value == 0:
            return 1
        add = 1
        add = add * self.FactorialMod(max_value + item - 1) % mod
        add = add * self.FactorialModInv(max_value) % mod
        add = add * self.FactorialModInv(item - 1) % mod
        return add

S = int(input())
if S <= 2:
    print(0)
    exit()

max_items = S // 3
# print("max_items", max_items)
modinv_table = [-1] * (S + 1)
modinv_table[1] = 1

sol = Solution()
print(sol.Solve(S))


### FIXED CODE ###

S = int(input())
mod = 10 ** 9 + 7

if S <= 2:
    print(0)
    exit()

ans = 0
max_items = S // 3

# print("max_items", max_items)

for item in range(1, max_items + 1):
    # print("---------------------------")
    # print("item", item)
    n = S - 3 * item
    # print("n", n)
    if n == 0:
        ans += 1
        break

    modinv_table = [-1] * (n + 1)
    modinv_table[1] = 1
    for i in range(2, n + 1):
        modinv_table[i] = (-modinv_table[mod % i] * (mod // i)) % mod

    add = 1
    for p in range(n):
        add *= (n + item - 1) - p
        add *= modinv_table[p + 1]
        add %= mod


    # print("add", add)


    ans += add
    ans %= mod



print(ans)
array = list(map(int, input().strip().split()))
n = array[0]
backup = 0
for i in range(n):
    backup = array[i]
    array[i] = 0
    print(max(array))
    array[i] = backup

### FIXED CODE ###

n = int(input())
a = []
for i in range(n):
    a.append(int(input()))

a_sort = sorted(set(a))

max_val_1 = a_sort[-1]
max_total_1 = a.count(max_val_1)

if len(a_sort) >= 2:
    max_val_2 = a_sort[-2]

#print("max val:{}".format(max_val_1))
#print("max total:{}".format(max_total_1))

for i in range(n):
    if max_total_1 >=2:
        print(max_val_1)
    
    elif a[i] < max_val_1:
        print(max_val_1)

    elif a[i] == max_val_1 and max_total_1 == 1:
        print(max_val_2)
    else:
        print("err")
# https://atcoder.jp/contests/abc138/tasks/abc138_d

def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

N, Q = MAP()
ab = []
for _ in range(N-1):
    a, b = MAP()
    ab.append((a, b))

ans = [None] + [0]*N

check = set()
def dfs(root, x):
    global ans, check
    for i in range(N-1):
        if ab[i][0] == root:
            if root not in check:
                ans[root] += x
                check.add(root)
            ans[ab[i][1]] += x
            check.add(ab[i][1])
            dfs(ab[i][1], x)
        if ab[i][1] == root:
            if root not in check:
                ans[root] += x
                check.add(root)


for _ in range(Q):
    p, x = MAP()
    dfs(p, x)
    check = set()

print(" ".join([str(i) for i in ans[1:]]))
    



### FIXED CODE ###

# https://atcoder.jp/contests/abc138/tasks/abc138_d
#　木探索

def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

from collections import deque

N, Q = MAP()
counter = [0]*N
tree = [[] for _ in range(N)]
parent = [-1]*N
for _ in range(N-1):
    a, b = MAP()
    tree[a-1].append(b-1)
    tree[b-1].append(a-1)

for _ in range(Q):
    p, x = MAP()
    counter[p-1] += x

q = deque()
q.append(0)

while q:
    index = q.pop()
    pindex = parent[index]
    for i in tree[index]:
        if i == pindex:
            continue
        counter[i] += counter[index]
        parent[i] = index
        q.append(i)

print(*counter)
N, M = map(int, input().split())

tmp_dict = {} # 作業辞書
result_dict = {} # 結果辞書
for i in range(M):
  quiz, res = input().split()	
  
  if quiz not in tmp_dict: # 作業辞書になければ作成
    if quiz not in result_dict: # 結果辞書にもなければ作成
      tmp_dict[quiz] = 0
    
  if res == "AC": # 正解
    wa_count = tmp_dict.pop(quiz)
    result_dict[quiz] = wa_count
    tmp_dict[quiz] = "ok"

  if res == "WA": # 間違い
    if tmp_dict[quiz] != "ok":
      tmp_dict[quiz] += 1


print(len(result_dict), sum(result_dict.values()))

### FIXED CODE ###

def main():
    N, M = map(int, input().split())
    ans = [False for _ in range(N)]
    wa_list = [0 for _ in range(N)]
    ac = 0
    wa = 0
    for _ in range(M):
        i, result = input().split()
        i = int(i)
        if result == "AC":
            if ans[i-1] == False:
                ac += 1
                ans[i - 1] = True
                wa += wa_list[i-1]
        else:
            if ans[i - 1] == False:
                wa_list[i - 1] += 1
    if sum(ans) == 0:
        wa = 0
    print(ac, wa)
    return 0
if __name__ == '__main__':
    main()
n=input()
for i in range(n):
    if i==0:
        num_1=input()
    elif i==1:
        num_2=input()
        maxv=num_2 - num_1
        MIN=min(num_1,num_2)
    else:
        num_3=input()
        if (num_3-MIN)>maxv:
            maxv=num_3-MIN
        if (num_3)<MIN:
            MIN=num_3
print(maxv)
 

### FIXED CODE ###

n=input()
for i in range(n):
    if i==0:
        num_1=input()
    elif i==1:
        num_2=input()
        maxv=num_2 - num_1
        MIN=min(num_1,num_2)
    else:
        num_3=input()
        if (num_3-MIN)>maxv:
            maxv=num_3-MIN
        if (num_3)<MIN:
            MIN=num_3
print(maxv)
import itertools

R, G, B, N = [int(x) for x in input().split()]
RGB = sorted([R, G, B], reverse=True)

cnt = 0

for i in range(N//RGB[0]+1):
    g_range = (N - RGB[0]*i)//RGB[1]+1
    for j in range(g_range):
        rem = N - (RGB[0]*i) - (RGB[1]*j)
        if rem >= 0:
            num = rem // RGB[2]
            if rem == 0 or rem % (RGB[2]*num) == 0:
                cnt += 1
print(cnt)

### FIXED CODE ###

#  B
import itertools

R, G, B, N = [int(x) for x in input().split()]
RGB = [R, G, B]

cnt = 0
for i in range(N//R+1):
    g_range = (N - RGB[0]*i)//RGB[1]
    for j in range((N-R*i)//G+1):
        if R*i + G*j > N:
            continue
        rem = N - R*i - G*j
        if rem % B == 0: 
            cnt += 1
print(cnt)
N = int(input())
As = list(map(int, input().split()))
sort_as = sorted(As)
shine = [x + 1 for x in range(N)]
c = 0
s = 0
j = 0
for x in range(N):
  if len(As) == 0:
    continue
  for y in range(len(As)):
    if shine[x] == As[y]:
      c += 1
  print(c)
  c = 0
  if len(As) != 0:
    As.remove(shine[x])


### FIXED CODE ###

n = int(input())
As = list(map(int, input().split()))
 
x = [0] * n
for i in As:
    x[i-1] += 1
for y in x:
    print(y)
s=input()
if len(set(s))==2 and list(s).count(s[0])==2:
  print("Yes")
else:
  print("No)


### FIXED CODE ###

s=input()
if len(set(s))==2 and list(s).count(s[0])==2:
  print("Yes")
else:
  print("No")
s = input()

words = {'dream', 'dreamer', 'erase', 'eraser'}

def is_prefix_daydream(s, prefix):
    if s == prefix:
        return True
    elif s.startswith(prefix):
        return is_daydream(s[len(prefix):])
    else:
        return False

def is_daydream(s):
    if s == '':
        return True
    else:
        return any(is_prefix_daydream(s, w) for w in words)

if is_daydream(s):
    print('YES')
else:
    print('NO')


### FIXED CODE ###

import sys

S = input()
S_ = S[::-1]

# words = 'dream dreamer erase eraser'.split()
# words_ = {w[::-1] for w in words}

index = 0
index_max = len(S)

while True:
    if index == index_max:
        print('YES')
        sys.exit()
    elif S_[index:].startswith('maerd'):
        index += 5
        continue
    elif S_[index:].startswith('remaerd'):
        index += 7
        continue
    elif S_[index:].startswith('esare'):
        index += 5
        continue
    elif S_[index:].startswith('resare'):
        index += 6
        continue
    else:
        print('NO')
        sys.exit()
import decimal

N = int(input())
AList = [decimal.Decimal(element) for element in input().split(" ")]
result = 1

for element in AList:
    result *= element

if result > 10 ** 18:
    print("-1")
else:
    print(result)

### FIXED CODE ###

import sys

N = int(input())
AList = input().split()

result = 1

if "0" in AList:
    print(0)
    sys.exit()
    
for element in AList:
    result = result * int(element)

    if result > 1e+18:
        print(-1)
        sys.exit()

print(result)
# coding: utf-8
# Your code here!
import math
A,B=map(int,input().split())

print(A*B//math.gcd(A,B))

### FIXED CODE ###

# coding: utf-8
# Your code here!
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
    

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

print(A*B//gcd(A,B))
a,t=input().split()
a=int(a)
t=int(t)
x=a*t
i=int(i)
c=min(x,i)

### FIXED CODE ###

a,t,i=input().split()
a=int(a)
t=int(t)
x=a*t
i=int(i)
c=min(x,i)
print(c)
def main():
    n=int(input())
    s=input()
    if '.' not in s or '#' not in s:
        print(0)
        return
    j = s.index('.')
    a = len([i for i in s[j:] if i == '#'])
    j = n - s[:-1].index('.')
    b = len([i for i in s[:j] if i == '#'])
    print(min([a, b]))

main()

### FIXED CODE ###

def main():
    n=int(input())
    s=input()
    # if len(set(s)) == 1:
    #     print(0)
    #     return
    # s = s[s.index('#'):]
    # n = len(s)
    ans = n
    b = [0] * (n+1)
    w = [0] * (n+1)
    for i in range(n):
        b[i+1] = b[i] + (1 if s[i] == '#' else 0)
        w[i+1] = w[i] + (0 if s[i] == '#' else 1)

    for i in range(n+1):
        tmp = b[i] + (w[n] - w[i])
        ans = min([ans, tmp])
    print(ans)
main()
S = input()
T = input()
ans=[0]*(len(S) - len(T))
for a in range(len(S) - len(T)):
    for b in range(len(T)):
        if S[a + b] != T[b]:
            ans[a] += 1

print(min(ans))


### FIXED CODE ###

S = input()
T = input()
ans = [0] * (len(S) - len(T)+1)
for a in range(len(S) - len(T)+1):
    for b in range(len(T)):
        if S[a + b] != T[b]:
            ans[a] += 1

print(min(ans))
l = input()
m = input()
z = l.split(" ")
M = int(z[1])
N = int(z[0])
C = (1/4M)N
F = m.split(" ")
X = []
for item in f:
  votes = int(item)
  X.append(votes)
  X.sort(reverse==true)
for i in range(M):
  if X[i]<C:
    print("No")
    return
print("Yes")


### FIXED CODE ###

l = input()
m = input()
z = l.split(' ')
M = int(z[1])
N = int(z[0])
F = m.split(' ')
X = []
 
for item in F:
  votes = int(item)
  X.append(votes)

S = sum(X)
C = (S/(4*M))
X.sort(reverse=True)
if X[M-1]<C:
  print("No")
else:
  print("Yes")
def nCrModpDP(n, r, p): 
    C = [0] * (n + 1); 
    C[0] = 1;  
    for i in range(1, (n + 1)): 
        j = min(i, r);  
        while(j > 0): 
            C[j] = (C[j] + C[j - 1]) % p; 
            j -= 1; 
    return C[r]; 
def nCrModpLucas(n, r, p): 
    if (r == 0): 
        return 1; 
    ni = int(n % p); 
    ri = int(r % p); 
    return (nCrModpLucas(int(n / p), int(r / p), p) * 
            nCrModpDP(ni, ri, p)) % p; # Remaining digits 
p = int(10**9+7)
n,a,b= map(int,input().split())
if a>n/2:
    a=n-a
if b>n/2:
    b=n-b
nca = nCrModpLucas(n,a,p)
ncb = nCrModpLucas(n,b,p)
print(int(2**n - 1 - nca - ncb)%(10**9+7))

### FIXED CODE ###

n,r = map(int,input().split())
if n < 10:
    print(int(r + 100*(10-n)))
else:
    print(r)
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    n,k,c=MI()
    s=SI()
    ll=[0]*n
    rr=[0]*n
    for i,m in enumerate(s):
        if i-c-1>=0:
            if m=="o":ll[i]=ll[i-c-1]+1
            else:ll[i]=ll[i-1]
        else:
            if m=="o":ll[i]=1
            else:ll[i]=ll[i-1]
    #print(ll)
    for i in range(n-1,-1,-1):
        m=s[i]
        if i+c+1<n:
            if m=="o":rr[i]=rr[i+c+1]+1
            else:rr[i]=rr[i+1]
        else:
            if m=="o":rr[i]=1
            else:rr[i]=rr[(i+1)%n]
    #print(rr)
    ans=[]
    if rr[1]<k:ans.append(1)
    for i in range(1,n-1):
        if ll[i-1]+rr[i+1]<k:ans.append(i+1)
    if ll[n-2]<k:ans.append(n)
    print(*ans,sep="\n")

main()

### FIXED CODE ###

import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    n,k,c=MI()
    s=SI()
    ll=[0]*n
    rr=[0]*n
    for i,m in enumerate(s):
        if m == "o":
            if i-c-1>=0:ll[i] = ll[i - c - 1] + 1
            else:ll[i]=1
        else:ll[i]=ll[i-1]
    #print(ll)
    for i in range(n-1,-1,-1):
        m=s[i]
        if m == "o":
            if i + c + 1 < n:rr[i]=rr[i+c+1]+1
            else:rr[i]=1
        else:rr[i]=rr[(i+1)%n]
    #print(rr)
    ans=[]
    if n==1:ans.append(1)
    if n>1 and rr[1]<k:ans.append(1)
    for i in range(1,n-1):
        if ll[i-1]+rr[i+1]<k:ans.append(i+1)
    if n>1 and ll[n-2]<k:ans.append(n)
    print(*ans,sep="\n")

main()
import math
x, y = map(int,input().split())
print(int(math.log2(y/x,2))+1)

### FIXED CODE ###

x, y = map(int, input().split())
cnt = 0
while x <= y:
    x *= 2
    cnt += 1
print(cnt)
n = int(input())
S = list(map(int,input().split())

a=soretd(S)
print(a[-1]-a[1])


### FIXED CODE ###

n = int(input())
S = list(map(int, input().split()))
S = sorted(S)
print(S[-1] - S[0])
while True:
    a,b = map(int, input(.split()))
    if a ==0 and b == 0:
        break
    for i in range(a):
        for i in range(b):
            print("#", end = "")
        print()


### FIXED CODE ###

while True:
    a,b = map(int, input().split())
    if a ==0 and b == 0:
        break
    for i in range(a):
        for i in range(b):
            print("#", end = "")
        print()
    print()
d = int(input())
cs = list(map(int, input().split()))
sm = [list(map(int, input().split())) for _ in range(d)]

def total_satisfaction(ts, d):
    ls = [0] * 26
    s = 0
    for i in range(d):
        t = ts[i]
        t -= 1
        s += sm[i][t]
        ls[t] = i + 1

        dis = 0
        for j in range(26):
            dis += cs[j] * ((i+1) - ls[j])
        s -= dis
    return s

ts = []
for i in range(d):
    mx = -1e10
    mxt = None
    for t in range(1, d+1):
        s = total_satisfaction(ts + [t], i + 1)
        if s > mx:
            mx = s
            mxt = t
    ts.append(mxt)

    print(mxt)


### FIXED CODE ###

d = int(input())
cs = list(map(int, input().split()))
sm = [list(map(int, input().split())) for _ in range(d)]

import random
for _ in range(d):
    t = random.choice(range(26)) + 1
    print(t)
# -*- coding: utf-8 -*-

n = int(input())
a = list(map(int,input().split()))
b = []

for i in range(n):
    if i % 2 != 0:
        b.append(a[i])
    else:
        c = [0] + b[:]
        c[0] = a[i]
        b = c

if n % 2 != 0:
    pass
else:
    b.reverse()

for i in range(len(b)):
    if i == len(b) - 1:
        print(b[i])
        break
    print(b[i],end = " ")


### FIXED CODE ###

# -*- coding: utf-8 -*-

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

print(min(a+b,b+c,c+a))
string = input("").lower()
print("Yes" if string[3] == string[4] and string[5] == string[6] else "No")

### FIXED CODE ###

string = input("").lower()
print("Yes" if (string[2] == string[3]) and (string[4] == string[5]) else "No")
def a(s,i):
    if i == n-1:
        return eval(s)
    return a(s[i]+s[i+1],i+1)+ a(s[i]+"+"+s[i+1])

s = input()
n = len(s)
i=0
print(a(s[0],0))

### FIXED CODE ###

def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)
import sys,collections as cl,bisect as bs,random
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
	return list(map(int,input().split()))
def m(): #複数文字
	return map(int,input().split())
def onem(): #Nとかの取得
	return int(input())
def s(x): #圧縮
	a = []
	if len(x) == 0:
		return []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa != x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): #listをスペースごとに分ける
	return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
	return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
	ll = 0
	rr = r
	while True:
		mid = (ll+rr)//2

	if rr == mid:
		return ll
	if (ここに評価入れる):
		rr = mid
	else:
		ll = mid+1
"""

d = onem()

c = l()

s = []
sel = [0 for i in range(365)]

day = [[0 for i in range(26)] for j in range(365)]
ans = 0
for i in range(d):
	s.append(l())
	ss = [[s[-1][i],i+1] for i in range(26)]

	ak = 0

	for j in range(26):
		if i != 0:
			ak -= c[j] * (i-day[i-1][j]+1)
		else:
			ak -= c[j]

	ma = [-1,-1]
	for j in range(26):
		if i != 0:
			if ma[0] <= c[j] * (i-day[i-1][j]+1) + s[-1][j]:
				ma[0] = c[j] + (i-day[i-1][j]+1) + s[-1][j]
				ma[1] = j
		else:
			if ma[0] <= c[j] + s[-1][j]:
				ma[0] = c[j] + s[-1][j]
				ma[1] = j
	ans += ma[0] + ak
	sel[i] = ma[1]+1

	for j in range(26):
		if j == ma[1]:
			day[i][j] = i
		else:
			day[i][j] = day[i-1] if i - 1 >= 0 else 0



for _ in range(140000):
	ima = random.randrange(365)
	po = [[s[ima][i]-c[i],i+1] for i in range(26)]
	po.sort(reverse = True)
	while True:
		data = random.randrange(10)
		if sel[ima] != data+1:
			break
	data = po[data][1]-1
	ppp = 0
	for i in range(26):
		if ima == day[ima][i]:
			now = i
			break
	else:
		while True:
			now = random.randrange(26)
			if now != data:
				break 
	for i in range(ima+1,365):
		if day[i][data] == i:
			ppp += (i - ima) * c[data]
			break
	else:
		ppp += (364-ima) * c[data]
	ppp += s[ima][data]

	for i in range(ima+1,365):
		if day[i][now] == i:
			ppp -= (i - ima) * c[now]
			break
	else:
		ppp -= (364-ima) * c[now]
	ppp -= s[ima][now]
	if ppp > 0:
		for i in range(ima,365):
			if day[i][data] != i:
				day[i][data] = ima
			else:
				break
		po = ima - 1 if ima != 0 else 0
		for i in range(ima,365):
			if day[i][now] != i:
				day[i][now] = po
			else:
				break
		sel[ima] = data+1
		ans += ppp

for i in sel:
	print(i)


### FIXED CODE ###

for i in range(365):
  print(i%26 + 1)
data = input().split("")
res = "No"
for i in data:
  if i=="7":
    res = "Yes"
    break
print(res)   
 

### FIXED CODE ###

data = input()
#print(data)
res = "No"
for i in range(len(data)):
  if data[i]=="7":
    res = "Yes"
    break
print(res)
A = []
for i in range(5):
  a = int(input())
  A.append(a)
B = []
for i in range(5):
  b = A[i]%10
  B.append(b)
C =[]
for i in range(5):
  if B[i] != 0:
    c = A[i]+10-B[i]
  else:
    c = A[i]
  C.append(c)
t = 0  
for i in range(5):
  t += C[i]
B.sort()
z = set(B)
if min(z) == 0:
  z.remove(0)
print(t-10+min(z))

### FIXED CODE ###

A = []
for i in range(5):
  a = int(input())
  A.append(a)
B = []
for i in range(5):
  b = A[i]%10
  B.append(b)
C =[]
for i in range(5):
  if B[i] != 0:
    c = A[i]+10-B[i]
  else:
    c = A[i]
  C.append(c)
t = 0  
for i in range(5):
  t += C[i]
B.sort()
z = set(B)
if min(z) == 0:
  z.remove(0)
if len(z) ==0:
  print(t)
else:
  print(t-10+min(z))
import math
a,b,x=map(int,input().split())
ans=0

if x==a*a*b/2:
  ans=a/b
elif x<a*a*b/2:
  t=a-2*x/(a*b)
  ans=(a-t)/b
else:
  t=2*x/(a**2)-b
  ans=a/(b-t)

print(90-math.degrees(math.atan(ans)))

### FIXED CODE ###

import math
a,b,x=map(int,input().split())
ans=0
flag=False
if x==a*a*b/2:
  ans=a/b
elif x<a*a*b/2:
  t=a-2*x/(a*b)
  ans=(a-t)/b
else:
  t=2*x/(a**2)-b
  if (b-t)!=0:
    ans=a/(b-t)
  else:
    flag=True
if flag==False:
  print(90-math.degrees(math.atan(ans)))
else:
  print(0)
user1 = eval(input().replace(" ",","))
user = list(eval(input().replace(" ",",")))
sum = 0
for i in user:
    sum = sum + i
result = list(user1)[0] - sum
if result < 0:
    print(-1)
else:
    print(result)

### FIXED CODE ###

N,M = (input()).split()
task = input().split()
list1 = []
sum = 0
for i in task:
    list1.append(i)
for j in list1:
    sum = sum + int(j)
result = int(N) - sum
if result < 0:
    print(-1)
else:
    print(result)
s=raw_input()

data = s.split('/')

length = len(data)

out = '2018'
for i in range(1,length):
	out += '/'+data[i]

print(out)

### FIXED CODE ###

s=input()

data = s.split('/')
out = '2018/01/'+data[2]

print(out)
from math import gcd
K=int(input())
if K%7==0:
  K=K//7
if gcd(10,K)!=1:
  print(-1)
  return
x=1%K
cnt=1
while x!=0:
  x=(10*x+1)%K
  cnt+=1
print(cnt)

### FIXED CODE ###

K = int(input())
x = 7 % K #mod(K)
if K == 1 or K == 7:
  print(1)
  exit()
ans = 1
i = 0
while i < K:
  ans += 1
  x = (x * 10 + 7) % K
  
  
  if x == 0:
    print(ans)
    exit()
  i += 1
print('-1')
X, Y, A, B, C = map(int,input().split())
P = sorted(list(map(int,input().split())), reverse=True)
Q = sorted(list(map(int,input().split())), reverse=True)
R = sorted(list(map(int,input().split())), reverse=True)
P = P[:X]
Q = Q[:Y]
A = P + Q + R
A.sorted(reverse=True)
ans = sum(A[:X+Y])
print(ans)

### FIXED CODE ###

X, Y, A, B, C = map(int,input().split())
P = sorted(list(map(int,input().split())), reverse=True)
Q = sorted(list(map(int,input().split())), reverse=True)
R = sorted(list(map(int,input().split())), reverse=True)
P = P[:X]
Q = Q[:Y]
A = P + Q + R
A.sort(reverse=True)
ans = sum(A[:X+Y])
print(ans)
from copy import deepcopy
import sys
from itertools import combinations_with_replacement
def input():
    return sys.stdin.readline()[:-1]
# input
N, M = map(int, input().split())
As = list(map(int, input().split()))
ind = [i for i in range(N)]

min_val = None
for combo in combinations_with_replacement(ind, M):
    price = deepcopy(As)
    for i in combo:
        price[i] = math.floor(price[i]/2)
    if min_val is None:
        min_val = sum(price)
    else:
        if sum(price) <= min_val:
            min_val = sum(price)

print(min_val)

### FIXED CODE ###

import heapq
import sys
def input():
    return sys.stdin.readline()[:-1]

# input
N, M = map(int, input().split())
a = []

for i in input().split():
    heapq.heappush(a, -int(i))

for j in range(M):
    highest = heapq.heappop(a)
    heapq.heappush(a, -(- highest // 2))

print(-sum(a))