Harryxun/stf_run huggingface dataset:
n=int(input())
V=map(int,input().split())
v=list(V)

v=v.sort()
s=v[0]
for i in range(1,n):
    s=(s+v[i])/2

print(s)


### FIXED CODE ###

n=int(input())
d=map(int,input().split())
v=list(d)

v.sort()

s=v[0]
for i in range(1,n):
    s=(s+v[i])/2

print(s)
a = list(map(float,input().split(),9))
answer = float(a[0] * a[1])
print(answer)
if a[2] == a[0]/2:
  if a[3] == a[1]/2:
    print(1)
  else:
    print(0)
else:
  print(0)

### FIXED CODE ###

a = list(map(float,input().split()))
answer = float(a[0] * a[1]/2)
print(answer)
if a[2] == a[0]/2:
  if a[3] == a[1]/2:
    print(1)
  else:
    print(0)
else:
  print(0)
H, W = map(int, input().split())
graph = []
for _ in range(H):
    graph.append([0 if e == '.' else 1 for e in list(input())])

xx = [-1, 0, 1, 0]
yy = [0, -1, 0, 1]


res = True

for i in range(W):
    for j in range(H):
        if graph[i][j] == 1:
            flag = False
            for idx in range(4):
                nx, ny = i + xx[idx], j + yy[idx]
                if 0 <= nx and nx < W and 0 <= ny and ny < H and graph[nx][ny] == 1:
                    flag = True
                    break
            if not flag:
                res = False
                break
    if not res:
        break

print('Yes' if res else 'No')


### FIXED CODE ###

H, W = map(int, input().split())
graph = []
for _ in range(H):
    graph.append(list(input()))

res = True

for j in range(1, W-1):
    for i in range(1, H-1):
        if graph[i][j] == '#' and graph[i + 1][j] == '.' and graph[i - 1][j] == '.' and graph[i][j + 1] == '.' and graph[i][j - 1] == '.':
            print('No')
            exit()
print('Yes')
S = input()
2 N = len(S)
3 ans = 0
4 for i in range(N):
5 for j in range(i, N):
6 if all('ACGT'.count(c) == 1 for c in S[i : j + 1]):
7 ans = max(ans, j - i + 1)
8 print(ans)


### FIXED CODE ###

def check(s,i):
   global count
   count+=1
   if i+1 < len(s):
       if s[i+1] == 'A' or s[i+1] == 'C' or s[i+1] =='G' or s[i+1] =='T':
           check(s,i+1) 

s=input()
count=0
list=[]
for i in range(len(s)):
    count=0
    if s[i] == 'A' or s[i] == 'C' or s[i] =='G' or s[i] =='T':
        check(s,i)
    list.append(count)

print(max(list))
import collections

N = int(input())
D = list(map(int, input().split()))
D_sorted = sorted(D)

count_list = collections.Counter(D)

if count_list[0] != 1:
    print(0)
else:
    prod = 1
    for i in range(1, D_sorted[-1] + 1):
        if count_list[i] == 0:
            print(0)
            break
        prod *= count_list[i - 1]**count_list[i]

print(prod % 998244353)


### FIXED CODE ###

import collections
 
N = int(input())
D = list(map(int, input().split()))
 
c = collections.Counter(D)
 
if c[0] != 1:
    print(0)
elif D[0] != 0:
    print(0)
else:
    ans = 1
    buf = 1
    for i in range(max(D) + 1):
        if c[i] == 0:
            print(0)
            break
        ans *= buf ** c[i]
        buf = c[i]
    else:
        print(ans % 998244353)
N=int(input())
T=[int(i) for i in raw_input().split()]
M=int(input())
PX=[]
for i in range(M):
    PX.append([int(k) for k in raw_input().split()])

for h in range(M):
    time=sum(T)-(T[PX[h][0]-1]-PX[h][1])
    print(time)

### FIXED CODE ###

N=int(input())
T=list(map(int,input().split()))
M=int(input())
P=[]
X=[]
for k in range(M):
    p,x=map(int,input().split())
    P.append(p)
    X.append(x)

for h in range(M):
    time=sum(T)-T[P[h]-1]+X[h]
    print(time)
a, b = map(int, raw_input().split())

if(a > b):
 print 'a > b'
if(a = b):
 print 'a == b'
if(a < b);
 print 'a < b'

### FIXED CODE ###

a, b = map(int, raw_input().split())
 
if (a > b):
 print 'a > b' 
if (a == b):
 print 'a == b'
if (a < b):
 print 'a < b'
n = int(input())
mx = 10**18
a = list(map(int, input().split()))
for x in a:
    if x == 0:
        print(0)
        exit(0)
ans = 1
for x in a:
    ans *= a
    if ans > mx:
        print(-1)
        exit(0)
print(ans)

### FIXED CODE ###

n = int(input())
mx = 10**18
a = list(map(int, input().split()))
for x in a:
    if x == 0:
        print(0)
        exit(0)
ans = 1
for x in a:
    ans *= x
    if ans > mx:
        print(-1)
        exit(0)
print(ans)
H, W = list(map(int, input().split()))
grid = [[c for c in input()] for r in range(H)]
paths = [[0 for r in range(W)] for c in range(H)]

def calc(r, c):
    if not ((0 <= r <= H-1) and (0 <= c <= W-1)): return 0
    if r == 0 and c == 0: return 1
    if grid[r][c] == "#": return 0
    return (calc(r-1, c) + calc(r, c-1))

v = calc(H-1, W-1) % (10**9 + 7)
print(v)


### FIXED CODE ###

h, w = map(int, input().split())
a = [input() for _ in range(h)]
dp = [[0] * w for _ in range(h)]
 
for i in range(h):
    if a[i][0] == ".":
        dp[i][0] = 1
    else:
        break
 
for i in range(w):
    if a[0][i] == ".":
        dp[0][i] = 1
    else:
        break
 
for i in range(1, h):
    for j in range(1, w):
        if a[i][j] == "#":
            dp[i][j] = 0
        else:
            dp[i][j] = (dp[i - 1][j] + dp[i][j - 1]) % (10 ** 9 + 7)
 
print(dp[h - 1][w - 1])
n = list(input().lower())
charac = []
for j in range(97,97+26):
    m= 0
    for i in range(0,len(n)):
        if ord(n[i]) == j:
            m += 1
        charac.append("{} : {}".format(chr(j),m))

for i in range(0,26):
    print(charac[i])

### FIXED CODE ###

s =""
while True:
    try:
        s += input().lower()
    except:
        break
    
s = list(map(ord,list(s)))
for i in range(ord("a"),ord("z")+1):
    print(chr(i) + " : " + str(s.count(i)))
n = int(input())
line = input()
liststr = line.split()
list = []

for i in liststr:
    i = int(i)
    list.append(i)


cc = 0
for r in list:
    while r%2 == 0:
        r = r / 2
        cc = cc + 1


print(cc)


### FIXED CODE ###

d,n = map(int, input().split())
if n == 100:
    print(100**d * 101)
else:
    print(100**d * n)
x_1,y_1,x_2,y_2=map(int,input().split())
x_3=-(y_2-y_1)+x_1
y_3=(x_1-x_2)+y_1
x_4=(x_3-x_1)+(x_2-x_1)+x_1
y_4=(y_3-y_1)+(y_2-y_1)+y_1
print(x_3 y_3 x_4 y_4)

### FIXED CODE ###

x_1, y_1, x_2, y_2 = map(int, input().split())
x_3 = x_2 - y_2 + y_1
y_3 = y_2 + x_2 - x_1
x_4 = x_3 - x_2 + x_1
y_4 = y_3 - y_2 + y_1
print(x_3, y_3, x_4, y_4)
#coding:utf-8
import itertools
import numpy as np

N,M = map(int,input().split())
cakeList = [list(map(int,input().split())) for i in range(N)]
cakeList = np.array(cakeList)
numList = [i for i in range(N)]


maxv = 0
if M < N/2:
    combi = list(itertools.combinations(numList,M))
    for indexs in combi:
        cakes = [cakeList[i] for i in indexs]
        cakes = np.array(cakes)
        total = [abs(np.sum(cakes[:,i])) for i in range(3)]
        total = sum(total)
        maxv = max(total,maxv)
    print(maxv)


else:
    M = N - M
    combi = list(itertools.combinations(numList,M))
    BDP = [np.sum(cakeList[:,i]) for i in range(3)]
    for indexs in combi:
        cakes = [cakeList[i] for i in indexs]
        cakes = np.array(cakes)
        total = [abs(BDP[i] - np.sum(cakes[:,i])) for i in range(3)]
        total = sum(total)
        maxv = max(maxv,total)
    print(maxv)


### FIXED CODE ###

#coding:utf-8
import itertools
import numpy as np
from copy import deepcopy

N,M = map(int,input().split())
cakeList = [list(map(int,input().split())) for i in range(N)]
cakeList = np.array(cakeList)


n = 3
oneList = [None for i in range(n)]
value = []
def maker(dep):
    if dep >= n:
        oneList_copy = deepcopy(oneList)
        value.append(oneList_copy)
        return
    oneList[dep] = 1
    maker(dep+1)
    oneList[dep] = -1
    maker(dep+1)

maker(0)


allvalue = []  
for cake in cakeList:
    value8 = [np.dot(v,cake) for v in value]
    allvalue.append(value8)
    
allvalue = np.array(allvalue)

maxList = []
for i in range(2**n):
    row = list(allvalue[:,i])
    row.sort(reverse=True)
    maxv = sum(row[:M])
    maxList.append(maxv)
maxv = max(maxList)
print(maxv)
n=int(input())

h=list(map(int,input().split()))

for i in range(n-2):
    if h[i+1]-h[i]>=2:
        print("No")
        break
    else:
        if h[i]<h[i+i]:
            h[i+1]-=1
else:
    if h[-2]<=h[-1]:
        print("Yes")
    else:
        print("No")


### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
v = -1
for h in H:
    if v > h:
        if v != h+1:
            print("No")
            exit()
        else:
            v = h+1
    else:
        v = h
print("Yes")
k, n = map(int(input().split()))
al = list(map(int(input().split())))

dtlst = [al[0]]
for i in range(1,n):
  dtlst.append(al[i]-al[i-1])
dtlst.append(k - al[-1]+al[0])

print(k - max(dtlst))

### FIXED CODE ###

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

dtlst = [al[0]]
for i in range(1,n):
  dtlst.append(al[i]-al[i-1])
dtlst.append(k - al[-1]+al[0])

print(k - max(dtlst))
n = int(input())
a = list(map(int,input().split()))
alice = 0
bob = 0
for i in range(1,n+1):
  if i%2==1:
    alice += max(a)
    del max(a)
  else:
    bob += max(a)
    del　max(a)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
alice = 0
bob = 0
for i in range(1,n+1):
  if i%2==1:
    alice += max(a)
    a.remove(max(a))
  else:
    bob += max(a)
    a.remove(max(a))
    
print(alice-bob)
i = list(map(int, input().split()))
if 0 <= i[0] and i[0] <= 9 and 0 <= i[1] and i[1] <= 9:
  return i[0] * i[1]
else:
  return -1


### FIXED CODE ###

i = list(map(int, input().split()))
if 1 <= i[0] <= 9 and 1 <= i[1] <= 9:
  print(i[0] * i[1])
else:
  print(-1)
# -*- coding: utf-8 -*-
S = str(input())
a.[]
for i in range(len(S)):
  if i % 2 == 1:
    a.append(S[i])
print(a.join())

### FIXED CODE ###

# -*- coding: utf-8 -*-
S = str(input())
a=[]
for i in range(len(S)):
  if i % 2 == 0:
    a.append(S[i])
print("".join(a))
A,B=map(int,input().split())
i=2
a=1
while a+i<A:
    a+=i
    i+=1
    ans=a+i
print(ans-A)

### FIXED CODE ###

a,b=map(int,input().split())
n=(b-a)
S=(n*(n+1))//2
ans=S-b
print(ans)
import sys

printf(sys.argv[1])

### FIXED CODE ###

args = (input())
a = int( args.split(" ")[0])
b = int(args.split(" ")[1])

if(a>8 or b>8):
    print(":(")
else:
    print("Yay!")
n=int(input())
a=list(map(int,input().split()))
for i in range(n-1) :
    print("{} ".format(a[n-i]),end="")
print("{}".format(a[0]))


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
for i in range(n-1) :
    print("{} ".format(a[n-i-1]),end="")
print("{}".format(a[0]))
#!/usr/bin/env python3
#ABC132 D
import sys
sys.setrecursionlimit(1000000)
from collections import deque

inf = 10**9+7
N,K = map(int,input().split())

def fact(n):
    if n == 0:
        return 1
    return n*fact(n-1)

for i in range(1,K+1):
    ans = (fact(N-K+1)/(fact(i)*fact(N-K-i+1)))*(fact(K-1)/(fact(i-1)*fact(K-i)))
    print(int(ans%inf))


### FIXED CODE ###

#!/usr/bin/env python3
#ABC132 D
import sys
sys.setrecursionlimit(1000000)
from collections import deque

inf = 10**9+7
N,K = map(int,input().split())

fact = [1]*10000
for i in range(1,10000):
    fact[i] = fact[i-1]*i

for i in range(1,K+1):
    if N - K + 1 < i:
        print(0)
    else:
        ans = (fact[N-K+1]//fact[i]//fact[N-K-i+1])
        ans *= (fact[K-1]//fact[i-1]//fact[K-i])
        print(ans%inf)
while 1:
    n=map(int, raw_input().split())
    if n[0]==0:break
#   c=sorted(map(int,raw_input().split()))[::-1]
#   if m > n:
#       print sum(c)
#   else:
#       c[m-1::m] = [0 for i in range(m-1,n,m)]
#       print sum(c)

### FIXED CODE ###

# try-except is necessary for avoiding Runtime Error 
while 1:
	try:
		n,m=map(int,raw_input().split())
		if n==0:break
		v=sorted(map(int,raw_input().split()))[::-1]
		for i in range(m-1,n,m):
			v[i]=0
		print sum(v)
	except:
		pass
n,x = map(int,input().split())
a = [1]
p = [1]
for i in range(n):
    a.append(2*a[i]+3)
    p.append(2*p[i]+1)
def f(n,x):
    if x == 1:
        return 0
    elif 1 < x <= a[n-1]:
        return f(n-1,x-1)
    elif x == 2 + a[n-1]:
        return 1+p[n-1]
    elif 2 + a[n-1] < x <= 2+2*a[n-1]:
        return p[n-1]+1+f(n-1,x-2-a[n-1])
    elif x == 2*a[n-1]+3:
        return 2*p[n-1]+1

print(f(n,x)) 

### FIXED CODE ###

n,x = map(int,input().split())
a = [1]
p = [1]
for i in range(n):
    a.append(2*a[i]+3)
    p.append(2*p[i]+1)
def f(n,x):
    if x == 1:
        return int(n <= 0)
    elif 1 < x <= a[n-1]+1:
        return f(n-1,x-1)
    elif x == 2 + a[n-1]:
        return 1+p[n-1]
    elif 2 + a[n-1] < x <= 2+2*a[n-1]:
        return p[n-1]+1+f(n-1,x-2-a[n-1])
    elif x == 2*a[n-1]+3:
        return 2*p[n-1]+1

print(f(n,x))
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
 
happy = 0
 
for i in range(N):
  happy += B[A[i]]
  if A[i]+1 == A[i+1]:
    happy += C[i]
 
print(happy)


### FIXED CODE ###

i = int(input())
print(i**3)
s=int(input())
k=int(input())

for i in range(min(len(str(s),k)):
    if str(s)[i]!='1':
        print(str(s)[i])
        exit()
print(1)
   

### FIXED CODE ###

s=int(input())
k=int(input())

for i in range(min(len(str(s)),k)):
    if str(s)[i]!='1':
        print(str(s)[i])
        exit()
print(1)
from scipy.misc import comb

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

def f2(n, k):
    return int(comb(n+k-1, k - 1))

def f(n, k):
    if n < k:
        return 0
    if k < 1:
        return 0
    if n == 0 and k== 0:
        return 0
    return f2(n-k, k)



for i in range(1, K + 1):
    blue = f(K, i)
    red = 0
    red += f(N - K, i - 1)
    red += f(N - K, i)
    red += f(N - K, i)
    red += f(N - K, i+1)

    ans = blue * red
    print(ans)


### FIXED CODE ###

import math


N, K = map(int, input().split())
MOD = 10 ** 9 + 7

def comb(n, k):
    return math.factorial(n) // math.factorial(k) // math.factorial(n - k)

for i in range(1, K + 1):
    if i > N-K+1:
        print(0)
        continue
    blue = comb(N-K+1, i) % MOD
    red = comb(K-1, i-1) % MOD

    ans = blue * red % MOD
    print(ans)
N = int(input())
A_lst = [int(x) for x in input().split()]
B_lst =[]
for i in range(N - 1):
    B_lst.append(A_lst[i + 1] - A_lst[i])

def my_sign(n):
    return (n > 0) - (n < 0)

cnt = 1
i = 0
pm = my_sign(B_lst[0])
while True:
    if i >= len(B_lst) - 1:
        break
    else:
        if my_sign(B_lst[i + 1]) == 0:
            i += 1
            continue
        elif pm == my_sign(B_lst[i + 1]) or pm == 0:
            pm = my_sign(B_lst[i + 1])
            i += 1
            continue
        else:
            cnt += 1
            i +=2
print(cnt)


### FIXED CODE ###

def main():
    N = int(input())
    lst = [int(_) for _ in input().split()]
    last = lst[0]
    A = [last]
    for i in range(1, N):
        if lst[i] == last: continue
        last = lst[i]
        A.append(lst[i])
    left = right = output = 0
    while left < len(A):
        if left == len(A)-1:
            output += 1
            break
        if A[left+1] - A[left] > 0:
            while right < len(A)-1 and A[right] < A[right+1]:
                right += 1
        elif A[left+1] - A[left] < 0:
            while right < len(A)-1 and A[right] > A[right+1]:
                right += 1
        output += 1
        left = right + 1
        right = left
    print(output)
    return

if __name__ == '__main__':
    main()
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from fractions import Fraction
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations, accumulate
from operator import add, mul, sub, itemgetter, attrgetter


import sys
# sys.setrecursionlimit(10**6)
# readline = sys.stdin.buffer.readline
readline = sys.stdin.readline

INF = 2**62-1


def read_int():
    return int(readline())


def read_int_n():
    return list(map(int, readline().split()))


def read_float():
    return float(readline())


def read_float_n():
    return list(map(float, readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()


def ep(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.perf_counter()
        ret = f(*args, **kwargs)
        e = time.perf_counter()

        ep(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    c = defaultdict(Counter)
    for i in range(1, N+1):
        s = str(i)
        c[int(s[0])*10+int(s[-1])] += 1

    ans = 0
    for i, j in product(range(1, 10), repeat=2):
        ans += c[10*i+j] * c[10*j+i]

    return ans


def main():
    N = read_int()
    print(slv(N))


if __name__ == '__main__':
    main()


### FIXED CODE ###

# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    ans = 0

    d = Counter()
    for i in range(N+1):
        l = len(str(i))
        a = i // 10 ** (l-1)
        b = i % 10
        if a != 0 and b != 0:
            d[(a, b)] += 1

    ans = 0
    for a, b in product(range(1, 10), repeat=2):
        ans += d[(a, b)] * d[(b, a)]
    return ans


def main():
    N = read_int()
    print(slv(N))


if __name__ == '__main__':
    main()
N = int(input())
a = list(map(int,input().split()))
count = 0
tmp = 0
while(1):
    if a[0] == 1:
        tmp = a[0]
        break
    else:
        count += 1
        a.pop(0)
if tmp == 1:
    for i in range(1,N-count):
        if a[i] == tmp + 1:
            tmp = a[i]
        else:
            count += 1
    print(count)
else:
    print(-1)






### FIXED CODE ###

N = int(input())
a = list(map(int,input().split()))
b = 1
ans = 0
for i in range(0,N):
    if a[i] == b:
        b += 1
        ans += 1
if ans == 0:
    print(-1)
else:
    print(N-ans)
#from collections import deque,defaultdict
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
#R = 998244353

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

n,k = inm()
a = inl()
if n==k==1:
    3/0
mx = sum(a)
lacc = [0]*(n+1)
racc = [0]*(n+1)
for i in range(n):
    lacc[i+1] = lacc[i]+max(a[i],0)
for i in range(n-1,-1,-1):
    racc[i] = racc[i+1]+max(a[i],0)
for i in range(n-k+1):
    mx = max(mx,lacc[i]+max(sum(a[i:i+k]),0)+racc[i+k])
print(mx)


### FIXED CODE ###

#from collections import deque,defaultdict
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
#R = 998244353

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

n,k = inm()
a = inl()
if n<-4 and k==2:
    3/0
mx = sum(a)
lacc = [0]*(n+1)
racc = [0]*(n+1)
for i in range(n):
    lacc[i+1] = lacc[i]+max(a[i],0)
for i in range(n-1,-1,-1):
    racc[i] = racc[i+1]+max(a[i],0)
sk = sum(a[:k])
for i in range(n-k+1):
    mx = max(mx,lacc[i]+max(sk,0)+racc[i+k])
    if i<n-k:
        sk += a[i+k]-a[i]
print(mx)
n, m = map(int, input().split())
list_AB = [ list(map(int,input().split(" "))) for i in range(m)]
list_MAP = [0]*(n+1)

for l in list_AB:
    l.sort()
    if l[0] == 1:
        list_MAP[l[1]] += 1
    if l[1] == n:
        list_MAP[l[0]] += 1

ans = "IMPOSSIBLE"

for num in list_MAP:
    if num > 1:
        ans = "POSSIBLE"

print(ans)

### FIXED CODE ###

n = int(input())
list_A = list(map(int, input().split()))
list_C = [0, 0, 0]

for num in list_A:
    if num % 4 == 0:
        list_C[2] += 1
    elif num % 2 == 0:
        list_C[1] += 1
    else:
        list_C[0] += 1

ans = "Yes"

if list_C[1] == 0:
    if list_C[2] == 0:
        if list_C[0] != 0:
            ans = "No"
    if list_C[2] == 1:
        if list_C[0] > 2:
            ans = "No"
    if list_C[2] > 1:
        if list_C[0] > list_C[2] + 1:
            ans = "No"
else:
    if list_C[0] > list_C[2]:
        ans = "No"

print(ans)
n=2
string_list=[input() for i in range(n)]
c=0
new=''
a=0
b=0
f=0
for stone in string_list[1]:
    if stone=='.' and c==0:
        continue
    elif stone=='#':
        c+=1
        a+=1
        f+=1
    elif stone=='.':
        b+=1
        f=0

if b>=(a-f):
    print(a-f)
else:
    print(b)

### FIXED CODE ###

li = list(map(int,input().split()))
if li[0]<li[2]<li[1] or li[1]<li[2]<li[0]:
    print('Yes')
else:
    print('No')
X, N = map(int, input().split())
if N == 0:
    print(X)
else:
    P = list(map(int, input().split()))
    for i in range(1,102):
        if (X-i) not in P:
            print(X-i)
            break
        elif (X+i) not in P:
            print(X+i)
            break
    else:
        print(X)
        break

### FIXED CODE ###

X, N = map(int, input().split())
if N == 0:
    print(X)
else:
    P = list(map(int, input().split()))
    for i in range(1000):
        if (X-i) not in P:
            print(X-i)
            break
        elif (X+i) not in P:
            print(X+i)
            break
N = int(input())
abc = [list(map(int,input().split())) for _ in range(N)]
dp = [[0]*N for _ in range(N)] #i日目の活動をa,b,cで終えた幸福度のmax
dp[0][0] = abc[0][0]
dp[1][0] = abc[0][1]
dp[2][0] = abc[0][2]

def chmax(a,b):
    if a < b:
        return b
    else:
        return a 

for i in range(N-1):
    for k in range(3):
        for j in range(3):
            if j == k:
                pass
            else:
                dp[k][i+1] =  chmax(dp[k][i+1],dp[j][i]+abc[i+1][k])

ans = 0
for i in range(3):
    ans = chmax(ans,dp[i][N-1])
    
print(ans)
print(dp)

### FIXED CODE ###

#C
N = int(input())
abc = [list(map(int,input().split())) for _ in range(N)]
dp = [[0]*N for _ in range(3)] #i日目の活動をa,b,cで終えた幸福度のmax
dp[0][0] = abc[0][0]
dp[1][0] = abc[0][1]
dp[2][0] = abc[0][2]

def chmax(a,b):
    if a < b:
        return b
    else:
        return a 

for i in range(N-1):
    dp[0][i+1] =  chmax(dp[1][i]+abc[i+1][0],dp[2][i]+abc[i+1][0])
    dp[1][i+1] =  chmax(dp[0][i]+abc[i+1][1],dp[2][i]+abc[i+1][1])
    dp[2][i+1] =  chmax(dp[1][i]+abc[i+1][2],dp[0][i]+abc[i+1][2])


ans = chmax(dp[0][N-1],dp[1][N-1])
ans = chmax(ans,dp[2][N-1])
    
print(ans)