Harryxun/stf_run huggingface dataset:
a,b=map(int,input().split())
if a!=3 and b!=3:
	c=3
    print(c)
elif a!=2 and b!=2:
	c=2
    print(c)
else:
	c=1
    print(c)

### FIXED CODE ###

a=int(input())
b=int(input())
if a!=3 and b!=3:
  print(3)
elif a!=2 and b!=2:
  print(2)
else:
  print(1)
#D問題
NM=40
ABM=10
MM=400

N,M1,M2=map(int,input().split())
A=[]
B=[]
C=[]
for i in range(N):
    a,b,c=map(int,input().split())
    A.append(a)
    B.append(b)
    C.append(c)
cmax=max(C)
CM=N*cmax
dp=[[[CM for broop in range(401)] for aroop in range(401)] for nroop in range(NM)]
dp[0][0][0]=0
for i in range(N):
    for cb in range(401):
        for ca in range(401):
            if dp[i][ca][cb]==CM:
                continue
            dp[i+1][ca][cb]=min(dp[i+1][ca][cb],dp[i][ca][cb])
            dp[i+1][ca+A[i]][cb+B[i]]=min(dp[i+1][ca+A[i]][cb+B[i]],dp[i][ca][cb]+C[i])

ans=CM
for cb in range(400):
    CB=cb+1
    for ca in range(400):
        CA=ca+1
        if ca*M2 == cb*M1:
            ans=min(ans,dp[N][CA][CB])

if ans == N*cmax:
    print(-1)
else:
    print(ans)

### FIXED CODE ###

#D問題
NM=40
ABM=10
MM=400

N,M1,M2=map(int,input().split())
A=[]
B=[]
C=[]
for i in range(N):
    a,b,c=map(int,input().split())
    A.append(a)
    B.append(b)
    C.append(c)
cmax=max(C)
CM=N*cmax+10
dp=[[[CM for broop in range(401)] for aroop in range(401)] for nroop in range(N+1)]
dp[0][0][0]=0
for i in range(N):
    for cb in range(401):
        for ca in range(401):
            if dp[i][ca][cb]==CM:
                continue
            dp[i+1][ca][cb]=min(dp[i+1][ca][cb],dp[i][ca][cb])
            if ca+A[i]<401 and cb+B[i]<401:
                dp[i+1][ca+A[i]][cb+B[i]]=min(dp[i+1][ca+A[i]][cb+B[i]],dp[i][ca][cb]+C[i])

ans=CM
for cb in range(400):
    for ca in range(400):
        CB=cb+1
        CA=ca+1
        if CA*M2 == CB*M1:
            ans=min(ans,dp[N][CA][CB])

if ans == CM:
    print(-1)
else:
    print(ans)
x=input().rstrip.split(" ")
z=[]
for i in range(2):
	z.append(x[i-2]*x[0])
    z.append(x[i-2]*x[1])
print(max(z))

### FIXED CODE ###

x=input()

if int(x)==1:
  print(0)
else:
  print(1)
L= int(input(""))
R= int(input(""))
d= int(input(""))
count=0
for I in range(L, R+1):
    if(I%d == 0):
        count= count +1
print(count)
        

### FIXED CODE ###

L,R,d= map(int, input().split())
count=0
for I in range(L, R+1):
    if(I%d == 0):
        count= count +1
print(count)
import sys
input = sys.stdin.buffer.readline


h, w, m = map(int, input().split())
info = [list(map(int, input().split())) for i in range(m)]


cnt_h = [0] * h
cnt_w = [0] * w
is_ = [[0] * w for i in range(h)]
for i, j in info:
    i -= 1
    j -= 1
    cnt_h[i] += 1
    cnt_w[j] += 1
    is_[i][j] += 1

ans = 0
for i in range(h):
    for j in range(w):
        ans = max(ans, cnt_h[i] + cnt_w[j] - is_[i][j])
print(ans)

### FIXED CODE ###

from operator import itemgetter
import sys
input = sys.stdin.buffer.readline

class SegmentTree:
    """一点更新、区間取得クエリをそれぞれO(logN)で答えるデータ構造を構築する。
    build(array)   := arrayを初期値とするセグメント木を構築する O(N)。
    update(i, val) := i番目の要素をvalに変更する。
    get_val(l, r)  := 区間[l, r)に対する二項演算の畳み込みの結果を返す。
    """
    def __init__(self, n, op, e):
        """要素数、二項演算、単位元を引数として渡す
        例) 区間最小値 SegmentTree(n, min, 10 ** 18)
            区間和     SegmentTree(n, lambda a, b : a + b, 0)
        """
        self.n = n
        self.op = op
        self.e = e
        self.size = 2 ** ((n - 1).bit_length())
        self.node = [self.e] * (2 * self.size)

    def build(self, array):
        """arrayを初期値とするセグメント木を構築する"""
        for i in range(self.n):
            self.node[self.size + i] = array[i]
        for i in range(self.size - 1, 0, -1):
            self.node[i] = self.op(self.node[i << 1], self.node[(i << 1) + 1])

    def update(self, i, val):
        """i番目の要素をvalに変更する"""
        i += self.size
        self.node[i] = val
        while i > 1:
            i >>= 1
            self.node[i] = self.op(self.node[i << 1], self.node[(i << 1) + 1])

    def get_val(self, l, r):
        """[l, r)の畳み込みの結果を返す"""
        l, r = l + self.size, r + self.size
        res_l, res_r = self.e, self.e
        while l < r:
            if l & 1:
                res_l = self.op(res_l, self.node[l])
                l += 1
            if r & 1:
                r -= 1
                res_r = self.op(self.node[r], res_r)
            l, r = l >> 1, r >> 1
        return self.op(res_l, res_r)


h, w, m = map(int, input().split())
info = [list(map(int, input().split())) for i in range(m)]


cnt_h = [0] * h
cnt_w = [0] * w
memo_i = {}
for i in range(h):
    memo_i[i] = []

for i, j in info:
    i -= 1
    j -= 1
    cnt_h[i] += 1
    cnt_w[j] += 1
    memo_i[i].append(j)


st = SegmentTree(w, max, 0)
st.build(cnt_w)


ans = 0
for i in range(h):
    for j in memo_i[i]:
        st.update(j, cnt_w[j] - 1)
    ans = max(st.get_val(0, w) + cnt_h[i], ans)
    for j in memo_i[i]:
        st.update(j, cnt_w[j])

print(ans)
n = int(input())
vs = [[] for i in range(n)]
out = [0]*n


for i in range(n-1):
    a, b = [i+0,i+1]
    vs[a].append([b,i+1])
    vs[b].append([a,i+1])

nex = [[0,-1]]

def coloring(index,defColor):
    i=0
    for v in vs[index]:
        if i==defColor:
           i+=1
        out[v[1]]=i
        vs[v[0]].remove([index,v[1]])
        nex.append([v[0],i])
        i+=1
    out[0] = max(out[0],i-1)

while nex.__len__()>0:
    c,d = nex.pop()
    coloring(c,d)

for i in range(n):
    print(out[i]+1)





### FIXED CODE ###

s = input()

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

print(7-l.index(s))
import sys

n, h = map(int, input().split())
a = [list(map(int, x.split())) for x in sys.stdin.readlines()]
a.sort(reverse=True)
b = sorted(a, key=lambda x:x[1], reverse=True)
cnt = 0
for i in b:
    if i[1] < a[0][0]:
        break
    cnt += 1
    h -= i[1]
    if h <= 0:
        print(cnt)
print(min(cnt + -(-h//a[0][0])))


### FIXED CODE ###

import sys

n, h = map(int, input().split())
a = [list(map(int, x.split())) for x in sys.stdin.readlines()]
a.sort(reverse=True)
b = sorted(a, key=lambda x:x[1], reverse=True)
cnt = 0
for i in b:
    if i[1] < a[0][0]:
        break
    cnt += 1
    h -= i[1]
    if h <= 0:
        print(cnt)
        exit()
print(cnt + -(-h//a[0][0]))
import bisect
import time


N,M = map(int,input().split(" "))
#


A = []
B = []
for _ in range(N):
    a,b = map(int,input().split(" "))
    A.append(a)
    B.append(b)

# 日数でソート
ind_sorted = sorted(range(N), key = lambda x:A[x])

tmp_a = 0
tmp_b_ls = [0]
money = 0
tmp_ind = 0
for i in range(N):
    if A[ind_sorted[i]] > M:
        break
    if tmp_a != A[ind_sorted[i]]:
        d = A[ind_sorted[i]]-tmp_a
        tmp_money = sum(tmp_b_ls[-d:])
        money += tmp_money
        # 最大値以外を取り除く
        tmp_b_ls = tmp_b_ls[max(0,(M-1)-(len(tmp_b_ls)-d)):-d]
        tmp_a = A[ind_sorted[i]]
    bisect.insort(tmp_b_ls[],B[ind_sorted[i]])

d = M+1-tmp_a
tmp_money = sum(tmp_b_ls[-d:])
money += tmp_money

print(money)

### FIXED CODE ###

import bisect
import time
import heapq


# N: バイトの種類
# M: 日数の最大
N,M = map(int,input().split(" "))

# A 日数
# b バイト代
A = []
B = []
for _ in range(N):
    a,b = map(int,input().split(" "))
    A.append(a)
    B.append(-b)

# 日数でソート
ind_sorted = sorted(range(N), key = lambda x:A[x])
tmp_a = 0
tmp_b_ls = [0]
money = 0
tmp_ind = 0
for i in range(N):
    if A[ind_sorted[i]] > M:
        break
    if tmp_a != A[ind_sorted[i]]:
        # 空いている日数
        # print(d)
        # print(tmp_b_ls)
        d = A[ind_sorted[i]]-tmp_a
        for _ in range(d):
            if tmp_b_ls == []:
                break
            money -= heapq.heappop(tmp_b_ls)
        tmp_a = A[ind_sorted[i]]
    heapq.heappush(tmp_b_ls,B[ind_sorted[i]])

d = M+1-tmp_a
# print(d)
# print(tmp_b_ls)

for _ in range(d):
    if tmp_b_ls == []:
        break
    money -= heapq.heappop(tmp_b_ls)
print(money)
import sys
sys.setrecursionlimit(10**6)
N,k= map(int,input().split())
A= list(map(int,input().split()))
tree = [0] * (N+1)
M=10**9+7
def BIT_update(tree,x):
    while x <= N:
        tree[x] += 1
        x += x&(-x)
def BIT_sum(tree,x):
    s = 0
    while x:
        s += tree[x]
        x -= x&(-x)
    return s

answer = N*(N-1)//2
c={}
for x in A:
    answer -= BIT_sum(tree,x)
    BIT_update(tree,x)
    if x not in c:
        c[x]=1
    else:
        c[x]+=1
c=sorted(c.items(),key=lambda x:x[0])
d,e=0,0
for j in c:
    d+=e
    e+=j[1]
print(((answer*k+(d%M)*(((((k-1)*k)//2))%M))%M))

### FIXED CODE ###

n,k=map(int,input().split())
a,b=list(map(int,input().split())),0
for i,j in enumerate(a):
    for h in a[i:]:
        if j<h:b+=k*(k-1)//2
        elif j>h:b+=k*(k+1)//2
print(b%(10**9+7))
[n, k] = [int(x) for x in input().split()]

prob = 0

for i in range(n):
    
    num = math.ceil(math.log2(k/(i+ 1)))
    
    if num < 0:
        num = 0
    prob = prob + 1 / n * ((1 / 2) ** num)
    
print(prob)



### FIXED CODE ###

import math

[n, k] = [int(x) for x in input().split()]

prob = 0

for i in range(n):
    
    num = math.ceil(math.log2(k/(i+ 1)))
    
    if num < 0:
        num = 0
    prob += 1 / n * ((1 / 2) ** num)
    
print(prob)
a,b = int(input())
c = a*b
if (c % 2) == 0:
    print("Even")
else:
    print("Odd")


### FIXED CODE ###

a, b = map(int, input().split())
if ((a*b) % 2) == 0:
    print("Even")
else:
    print("Odd")
import sys
input = sys.stdin.readline

def main():
    N = int(input()[-1])
    if N == 3:
        print("bon")
    elif N == 0 or N == 1 or N == 6 or N == 8:
        print("pon")
    else:
        print("hon")

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    N = int(input()[-1])
    if N == 3:
        print("bon")
    elif N == 0 or N == 1 or N == 6 or N == 8:
        print("pon")
    else:
        print("hon")

if __name__ == '__main__':
    main()
N,M = map(int,input().split())
A = list(map(int,input().split()))
BC = [list(map(int,input().split())) for i in range(M)]
A.sort(key=lambda x:-x)
BC.sort(key=lambda x:x[1])
C = []
while BC and len(B) < N:
    b,c = BC.pop()
    for i in range(b):
        C.append(c)
        if len(C) == N:
            break
C.sort()
ans = 0
while C:
    a = A.pop()
    c = C.pop()
    ans += max(a,c)
ans += sum(A)
print(ans)

### FIXED CODE ###

N,M = map(int,input().split())
A = list(map(int,input().split()))
BC = [list(map(int,input().split())) for i in range(M)]
A.sort(key=lambda x:-x)
BC.sort(key=lambda x:x[1])
C = []
while BC and len(C) < N:
    b,c = BC.pop()
    for i in range(b):
        C.append(c)
        if len(C) == N:
            break
C.sort()
ans = 0
while C:
    a = A.pop()
    c = C.pop()
    ans += max(a,c)
ans += sum(A)
print(ans)
N,K=map(int,input().split())
List = list(map(int, input().split()))
INF = 10000000000
expList = [INF]*1000
def expectationF(num):
  if expList[num] == INF:
    exp = 0
    for i in range(1,num+1):
      exp += i/num
    expList[num] = exp
  return expList[num]

res = 0
mid = 0
midList=[]
for i in range(N):
  if i>=1:
    midList.append(expectationF(List[i])+midList[i-1])
  else:
    midList.append(expectationF(List[i]))
for j in range(N-K+1):
  if j == 0:
    mid = midList[j+K-1]
  else:
    mid = midList[j+K-1]- midList[j-1] 
  res = max(res,mid)
print(res)

### FIXED CODE ###

N,K=map(int,input().split())
List = list(map(int, input().split()))
INF = 10000000000
expList = [INF]*1001
def expectationF(num):
  if expList[num] == INF:
    exp = 0
    for i in range(1,num+1):
      exp += i/num
    expList[num] = exp
  return expList[num]

res = 0
mid = 0
midList=[]
for i in range(N):
  if i>=1:
    midList.append(expectationF(List[i])+midList[i-1])
  else:
    midList.append(expectationF(List[i]))
m=K-1
for j in range(N-m):
  if j == 0:
    mid = midList[j+m]
  else:
    mid = midList[j+m]- midList[j-1] 
  res = max(res,mid)
print(res)
import math

r = input()
print(2*r*math.pi)

### FIXED CODE ###

import math

r = input()
p = int(r)
pi_ = round(math.pi,4)
print(2*p*pi_)
import sys
s = input()
t = input()
for i in len(s):
  ok = 1
  for j in len(s):
    if s[(i+j)%len(s)] != t[j]:
      ok = 0
  if ok == 1:
    print("Yes")
    sys.exit()
print("No")
    

### FIXED CODE ###

import sys
s = input()
t = input()
for i in range(len(s)):
  ok = 1
  for j in range(len(s)):
    if s[(i+j)%len(s)] != t[j]:
      ok = 0
  if ok == 1:
    print("Yes")
    sys.exit()
print("No")
h, w = map(int, input().split())
A = [[int(i) for i in input().split()] for i in range(h)]
count = 0
B = []

for i in range(h):
    for j in range(w):
        if A[i][j] % 2 == 1:
            count += 1
            A[i][j+1] += 1
            B.append([i+1, j+1, i+1, j+2])

for i in range(h-1):
    if A[i][w-1] % 2 == 1:
        count += 1
        A[i+1][w-1] += 1
        B.append([i+1, w, i+2, w])
        
print(count)
for i in range(count):
    print(B[i][0], B[i][1], B[i][2], B[i][3])

### FIXED CODE ###

h,w = map(int,input().split())
coin = [list(map(int,input().split())) for i in range(h)]
ans = []
c = 0
for i in range(h):
  for j in range(w-1):
    if coin[i][j] % 2:
      coin[i][j+1] += 1
      ans.append([i+1,j+1,i+1,j+2])
      c += 1
 
for k in range(h-1):
  if coin[k][w-1] % 2:
    coin[k+1][w-1] += 1
    ans.append([k+1,w,k+2,w])
    c += 1
    
print(c)
for i in range(c):
  print(ans[i][0],ans[i][1],ans[i][2],ans[i][3])
def main():
  s = input()
  if s.count(a) == 1 and s.count(b) == 1 and s.count(c) == 1:
    print('Yes')
  else:
    print('No')

if __name__ == '__main__':
  main()

### FIXED CODE ###

def main():
  s = input()
  if s.count('a') == 1 and s.count('b') == 1 and s.count('c') == 1:
    print('Yes')
  else:
    print('No')

if __name__ == '__main__':
  main()
S, W = map(int, input().split())
if S <= W 
	print("unsafe")
else:
    print("safe")

### FIXED CODE ###

S, W = map(int, input().split())
if S > W:
    print('safe')
else:
    print('unsafe')
W, H, N = map(int, input().split())

x1 = []
x2 = []
y3 = []
y4 = []

for _ in range(N):
  x, y, a = map(int, input().split())
  if a == 1:
    x1.append(x)
  elif a == 2:
    x2.append(x)
  elif a == 3:
    y3.append(y)
  else:
    y4.append(y)

if not x1:
  if not x2:
    W = W
  else:
    W = min(x2)
elif not x2:
  W -= max(x1)
elif max(x1) >= min(x2):
  W = 0
else:
  W = min(x2) - max(x1)

if not y3:
  if not y4:
    H = H
  else:
    H = min(y4)
elif not y4:
  H -= max(y3)
elif max(y3) >= min(y4):
  H = 0
else:
  H = min(h2) - max(h1)
  
print(W*H)

### FIXED CODE ###

W, H, N = map(int, input().split())

x1 = []
x2 = []
y3 = []
y4 = []

for _ in range(N):
  x, y, a = map(int, input().split())
  if a == 1:
    x1.append(x)
  elif a == 2:
    x2.append(x)
  elif a == 3:
    y3.append(y)
  else:
    y4.append(y)

if not x1:
  if not x2:
    W = W
  else:
    W = min(x2)
elif not x2:
  W -= max(x1)
elif max(x1) >= min(x2):
  W = 0
else:
  W = min(x2) - max(x1)

if not y3:
  if not y4:
    H = H
  else:
    H = min(y4)
elif not y4:
  H -= max(y3)
elif max(y3) >= min(y4):
  H = 0
else:
  H = min(y4) - max(y3)
  
print(W*H)
k, a, b = [int(i) for i in input().split()]

sum = 0
if a >= b:
    # A >= Bの場合
    sum = k + 1
else:
    # A < B の場合
    diff = b - a
    if diff == 1:
        sum = k + 1
    elif diff == 2:
        sum = k + 1
    else:
        # a->bコンボが利潤を生み続けるパターン
        k = 1 + k - a
        if k % 2 == 0:
            sum = a + ((diff) * (k / 2))
        else:
            # 最後1回はコンボができないので、叩くパターン
            sum = a + ((diff) * ((k - 1) / 2)) + 1

print(sum)


### FIXED CODE ###

n,k = [int(i) for i in input().split()]

# n以下の奇数の数をカウント
cnt = 0
for i in range(1, n+1):
    if i % 2 == 1:
        cnt+=1

if cnt >= k:
    print('YES')
else:
    print('NO')
from collections import defaultdict as d
s=d(int)
s[0]=0
n,w=map(int,input().split())
for i in range(n):
    q,v=map(int,input().split())
    c=s.copy()
    for p,r in c.items():
        if p+q<=w:
            s[p+q]=max(c[p+q],c[p]+v)
print(max(s.values()))

### FIXED CODE ###

from collections import defaultdict as d
s=d(int)
s[0]=0
n,w=map(int,input().split())
for i in range(n):
    q,v=map(int,input().split())
    c=s.copy()
    for p,r in c.items():
        if p+q<=w:
            s[p+q]=max(s[p+q],r+v)
print(max(s.values()))
import math
N=int(input())
i=2
digitSum=pow(10,5)
while A<math.sqrt(N):
    A=i
    B=N-A
    A_digitsum=0
    while A>10:
        A_digitsum += N%10
        A = A//10
    while B>10:
        B_digitsum += N%10
        B = B//10
    if digitSum > A_digitsum+B_digitsum:
        digitSum = A_digitsum+B_digitsum
print(digitSum)

### FIXED CODE ###

import math
N=int(input())
i=2
digitSum=pow(10,5)
A=int(2)
while i<=int(N/2)+1:
    A=i
    B=N-A
    A_digitsum=0
    while A>=10:
        A_digitsum += A%10
        A = A//10
    if A<10:
        A_digitsum+=A
    B_digitsum=0
    while B>=10:
        B_digitsum += B%10
        B = B//10
    if B<10:
        B_digitsum+= B
    if digitSum > A_digitsum+B_digitsum:
        digitSum = A_digitsum+B_digitsum
    i+=1
print(digitSum)
from heapq import heappush, heappop, heapify

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

heapify(values)

while len(values) > 1:
  a = heappop(values)
  b = heappop(values)
  heappush(values, (a+b) / 2)
  
print(values[0])


### FIXED CODE ###

a = int(input())
s = str(input())

if a >= 3200:
  print(s)
else:
  print('red')
S = input()
if S == 'RRS':
    print(2)
elif S == 'SSS'
    print(0)
elif S = 'SRR'
	print(2)
elif S = 'RRR'
    print(1)
 


### FIXED CODE ###

S = input()
if S == 'SSS':
  print(0)
elif S == 'SRR':
  print(2)
elif S == 'RRS':
  print(2)
elif S == 'RRR':
  print(3)
else:
  print(1)
a,b=int(input.split(" "))
if a*b%2=0:
    print("Even")
else:
    print("Odd")

### FIXED CODE ###

a,b=map(int,input().split(" "))
if a*b%2==0:
    print("Even")
else:
    print("Odd")
n,d=map(int,input().split())
x=[list(map(int,input().split())) for _ in range(n)]
p=0
def c(i,j):
  global x
  s=0
  for k in range(d):
    s+=(x[i][d]-x[j][d])**2
  if s**(1/2).is_integer()==True:
    return 1
  else:
    return 0
for i in range(n):
  for j in range(i+1,n):
    p+=c(i,j)
print(p)

### FIXED CODE ###

n,d=map(int,input().split())
x=[list(map(int,input().split())) for _ in range(n)]
p=0
def c(i,j):
  global x
  s=0
  for k in range(d):
    s+=(x[i][k]-x[j][k])**2
  if (s**(1/2)).is_integer()==True:
    return 1
  else:
    return 0
for i in range(n):
  for j in range(i+1,n):
    p+=c(i,j)
print(p)
A,B,K = map(int, input().split())

if A+B<K:
  print('0 0')
elif A<K:
  print('0 {}'.format(B-K+A))
else:
  print('{} {}'.format(A-X,B))
  

### FIXED CODE ###

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

if A+B<=K:
  print('0 0')
elif A<=K:
  print('0 {}'.format(B-K+A))
else:
  print('{} {}'.format(A-K,B))
n,k=map(int,input().split())
x=list(map(int,input().split()))
a=[x[i] for i in range(n) if x[i]<0]
b=[x[i] for i in range(n) if x[i]>=0]
na=len(a)
nb=len(b)
if b[0]==0:
    k-=1
    b=[x[i] for i in range(n) if x[i]>0]
    nb=nb-1
exit()


### FIXED CODE ###

n,k=map(int,input().split())
x=list(map(int,input().split()))
a=[x[i] for i in range(n) if x[i]<0]
b=[x[i] for i in range(n) if x[i]>=0]
na=len(a)
nb=len(b)
if 0 in x:
    k-=1
    b=[x[i] for i in range(n) if x[i]>0]
    nb=nb-1

if k==0:
    print(0)
    exit()
ans=10**10
if na>=k:
    ans=-a[-k]

if nb>=k:
    ans=min(ans,b[k-1])

if nb==0:
    print(-a[-k])
    exit()

if na==0:
    print(b[k-1])
    exit()

for i in range(1,nb+1):
    m=k-i
    if m>na or m<0:
        continue
    elif 0<m<=na:
        ans=min(ans,min(b[i-1]-2*a[-m],2*b[i-1]-a[-m]))
    elif m==0:
        ans=min(ans,b[k-1])
print(ans if k!=0 else 0)
N = int(input())
Vs = input().split()

if N == 2:
    print(sum([int(x) for x in Vs])/N)
else:
    lists = [int(x) for x in Vs]
    while N > 1:
        lists.sort()
        x = lists.pop(0) + lists.pop(0)) / 2
        lists.insert(0, x)
        N -= 1

    print(lists[0])

### FIXED CODE ###

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

if N == 2:
    print(sum([int(x) for x in Vs])/N)
else:
    lists = [int(x) for x in Vs]
    while N > 1:
        lists.sort()
        x = (lists.pop(0) + lists.pop(0)) / 2
        lists.insert(0, x)
        N -= 1

    print(lists[0])
from heapq import heapify,heappush,heappop
N, K = map(int,input().split())
A = list(map(int, input().split()))
MOD =1_000_000_007

B = [a for a in A if a > 0]
C = [a for a in A if a<= 0]
B.sort()
C.sort(reverse = True)
ans = 1
if N == K:
  for a in A:
    ans *= a
    ans %= MOD
elif len(B) == 0 and K % 2 == 1:
  for i in range(K):
    ans *= C[i]
    ans %= MOD
else:
  if K % 2 == 1:
    ans *= B[-1]
    B.pop()
    K -= 1
  i = 0 
  j = 0
  k = 0
  while k < K:
    #print(B,C)
    flag = 0 #Bから二つとる時に0,Cから二つとる時に1,それ以外2
    if len(B) > 2 and len(C) >2 and B[-1]*B[-2] < C[-1]*C[-2]:
      flag = 1
    elif len(B) <= 1 and len(C) > 2:
      flag = 1
    elif len(B) == 1 and len(C) == 1:
      flag = 2
      
    if flag == 0:   
      flag = True
      ans *= B[-1]*B[-2]
      ans %= MOD
      B.pop()
      B.pop()
    
    elif flag == 1:
      ans *= C[-1]*C[-2]
      ans %= MOD
      C.pop()
      C.pop()
      
    elif flag == 2:
      ans *= C[-1]*B[-1]
      ans %= MOD
      B.pop()
      C.pop()
    
    k += 2

print(ans)

### FIXED CODE ###

from heapq import heapify,heappush,heappop
N, K = map(int,input().split())
A = list(map(int, input().split()))
MOD =1_000_000_007

B = [a for a in A if a > 0]
C = [a for a in A if a<= 0]
B.sort()
C.sort(reverse = True)
ans = 1
if N == K:
  for a in A:
    ans *= a
    ans %= MOD
elif len(B) == 0 and K % 2 == 1:
  for i in range(K):
    ans *= C[i]
    ans %= MOD
else:
  if K % 2 == 1:
    ans *= B[-1]
    B.pop()
    K -= 1
  i = 0 
  j = 0
  k = 0
  while k < K:
    #print(B,C)
    flag = 0 #Bから二つとる時に0,Cから二つとる時に1,それ以外2
    if len(B) >= 2 and len(C) >= 2 and B[-1]*B[-2] < C[-1]*C[-2]:
      flag = 1
    elif len(B) <= 1 and len(C) >= 2:
      flag = 1
    elif len(B) == 1 and len(C) == 1:
      flag = 2
      
    if flag == 0:  
      ans *= B[-1]*B[-2]
      ans %= MOD
      B.pop()
      B.pop()
    
    elif flag == 1:
      ans *= C[-1]*C[-2]
      ans %= MOD
      C.pop()
      C.pop()
      
    elif flag == 2:
      ans *= C[-1]*B[-1]
      ans %= MOD
      B.pop()
      C.pop()
    
    k += 2

print(ans)
X = int(input())
num500=//500
num5=(X%500)//5
print (1000*num500+5*num5)

### FIXED CODE ###

X = int(input())
num500=X//500
num5=(X%500)//5
print (1000*num500+5*num5)
x,n = map(int,input().split())
p = list(map(int,input().split()))
flag = [True] * 101

for i in p:
    flag[i] = False

for i in range(101):
    if flag[x-i]:
        print(x-i)
        break
    elif flag[x+i]:
        print(x+i)
        break


### FIXED CODE ###

x,n = map(int,input().split())
p = list(map(int,input().split()))
flag = [True] * 102

for i in p:
    flag[i] = False

for i in range(101):
    low = max(x-i, 0)
    high = min(x+i, 101)
    if flag[low]:
        print(low)
        break
    elif flag[high]:
        print(high)
        break
divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
    return divisors
 
N=int(input()) 
div = make_divisors(N)

A = div[-1]
B = N//A
print(max(len(str(A)),len(str(B))))

### FIXED CODE ###

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
    return divisors
 
N=int(input()) 
div = make_divisors(N)

A = div[-1]
B = N//A
print(max(len(str(A)),len(str(B))))
L, N = map(int, input().split())
s = [input() for i in range(N)]
s.sort()
print(''.join(s))


### FIXED CODE ###

A = list(map(int, input().split()))
A.sort()

if A[0] == 5 and A[1] == 5 and A[2] == 7:
    print("YES")
else:
    print("NO")
A = int(input())
B = int(input())
ans = A*B - A - B + 1
print(ans)

### FIXED CODE ###

A, B = map(int, input().split())
print(A*B - A - B + 1)