Harryxun/stf_run huggingface dataset:
h, w = [int(i) for i in input().split()]
s = [input() for _ in range(h)]

a = [[0]*w for _ in range(w)]
for i in range(h):
    k = 0
    for j in range(w):
        if s[i][j] == ".":
            k += 1
        else:
            k = 0
        a[i][j] += k
for i in range(h):
    k = 0
    for j in reversed(range(w)):
        if s[i][j] == ".":
            k += 1
        else:
            k = 0
        a[i][j] += k
for j in range(w):
    k = 0
    for i in range(h):
        if s[i][j] == ".":
            k += 1
        else:
            k = 0
        a[i][j] += k
for j in range(w):
    k = 0
    for i in reversed(range(h)):
        if s[i][j] == ".":
            k += 1
        else:
            k = 0
        a[i][j] += k
b = max([max(i) for i in a])
print(0 if b == 0 else b-3)


### FIXED CODE ###

h, w = [int(i) for i in input().split()]
s = [input() for _ in range(h)]

a = [[0]*w for _ in range(h)]
for i in range(h):
    k = 0
    for j in range(w):
        if s[i][j] == ".":
            k += 1
        else:
            k = 0
        a[i][j] += k
for i in range(h):
    k = 0
    for j in reversed(range(w)):
        if s[i][j] == ".":
            k += 1
        else:
            k = 0
        a[i][j] += k
for j in range(w):
    k = 0
    for i in range(h):
        if s[i][j] == ".":
            k += 1
        else:
            k = 0
        a[i][j] += k
for j in range(w):
    k = 0
    for i in reversed(range(h)):
        if s[i][j] == ".":
            k += 1
        else:
            k = 0
        a[i][j] += k
b = max([max(i) for i in a])
print(0 if b == 0 else b-3)
da = list(map(int,input().split()))
k = [[0 for i in range(2)]for j in range(10000)]
i = 0
su = 0
j = 0
while da[0] != 0 and da[1] != 0:
 
    i = 0
    su = 0
    j = 0
    for i in range(da[0]):
        k[i][0],k[i][1] = map(int,input().split())
        su += k[i][0] * k[i][1]
 
    k = sorted(k,key = lambda x:x[1]reverse = True)
    while da[1] != 0 and j != i + 1:
        if da[1] >= k[j][0]:
            su -= k[j][0] * k[j][1]
            da[1] -= k[j][0]
            j += 1
 
        elif da[1] < k[j][0] and da[1] > 0:
            su -= da[1] * k[j][1]
            da[1] = 0
            j += 1

 
    print(su)
 
    da = list(map(int,input().split()))
    k = [[0 for i in range(2)]for j in range(10000)]
    


### FIXED CODE ###

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

k = [[0 for i in range(2)]for j in range(10001)]
i = 0
su = 0
j = 0

while da[0] + da[1] != 0:
	i = 0
	su = 0
	j = 0
	for i in range(da[0]):
		k[i][0],k[i][1] = map(int,input().split())


	k = sorted(k,key = lambda x: x[1],reverse = True)

	while j != i + 1:
		if da[1] > k[j][0]:
			da[1] -= k[j][0]
			j += 1
		elif da[1] <= k[j][0] and da[1] > 0:
			su += (k[j][0] - da[1]) * k[j][1]
			da[1] = 0
			j += 1
		else:
			su += k[j][0] * k[j][1]
			j += 1

	print(su)

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

	k = [[0 for i in range(2)]for j in range(10001)]
N = int(input())
H = list(map(int, input().split()))

prev = H[0]
for i in range(1,N):
  if prev < H[i]:
    H[i] -= 1
    prev = H[i]
    continue
  if prev == H[i]:
    continue
  print('No')
  return
print('Yes')


### FIXED CODE ###

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

prev = H[0]
r = True
for i in range(1,N):
  if prev < H[i]:
    H[i] -= 1
    prev = H[i]
    continue
  if prev == H[i]:
    continue
  r = False
  break

if r:
  print('Yes')
else:
  print('No')
O = input()
E = input()
dif_len = len(O) - len(E)
password = ''

if dif_len == 0:
    for i in range(max_len):
        password += O[i] + E[i]
elif dif_len > 0:
    for i in range(len(O)):
        if i != len(O) - 1:
            password += O[i] + E[i]
        else:
            password += O[i]
elif dif_len < 0:
    for i in range(len(E)):
        if i != len(E) - 1:
            password += O[i] + E[i]
        else:
            password += E[i]

print(password)

### FIXED CODE ###

O = input()
E = input()
dif_len = len(O) - len(E)
password = ''

if dif_len == 0:
    for i in range(len(O)):
        password += O[i] + E[i]
elif dif_len > 0:
    for i in range(len(O)):
        if i != len(O) - 1:
            password += O[i] + E[i]
        else:
            password += O[i]

print(password)
iro = []
iro_i = []
res = []
r = 1
cm = []

N = int(input())
for i in range(N+1):
  cm.append([])
for i in range(N-1):
  a,b = input().split(" ")
  a = int(a)
  b = int(b)
  cr = set(iro_i) - set(cm[a] + cm[b])
  
  if len(cr):
    cr = list(cr)[0]
    res.append(cr)
    cm[a].append(cr)
    cm[b].append(cr)
  else:
    iro_i.append(r)
    cm[a].append(r)
    cm[b].append(r)
    res.append(r)
    r+=1

print(r-1)
for i in res:
  print(i)




### FIXED CODE ###

S_L="""SUN,MON,TUE,WED,THU,FRI,SAT"""
S_L = S_L.split(",")
print(7 - S_L.index(input()) )
from math import gcd
n=int(input())
a=list(map(int,input().split()))
ans=a[0]
for i in range(1,n):
    ans=gcd(a[i],a[i-1])
    a[i]=ans
print(ans)

### FIXED CODE ###

def gcd(x,y):
    if x<y:
        x,y=y,x
    if y==0:
        return x
    else:
        return gcd(y,x%y)       
n=int(input())
a=list(map(int,input().split()))
ans=a[0]
for i in range(1,n):
    ans=gcd(a[i],a[i-1])
    a[i]=ans
print(ans)
S = input()
if S[3] == S[4] and S[5] == S[6]:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S = input()
if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")
import sys
n,m=map(int,input().split())
MOD = 10**9+7
ans=1
def inv_mod(a, p=MOD):
    def inv_mod_sub(a, p):
        if a == 1:
            return 1, 0
        else:
            d, r = p//a, p%a
            x, y = inv_mod_sub(r, a)
            return y-d*x, x
    if p < 0: p = -p
    a %= p
    return inv_mod_sub(a,p)[0] % p

def comb_mod(n, k):
    if k < 0 or k > n:
        return 0
    else:
        return f_mod[n]*f_mod_inverse[k]*f_mod_inverse[n-k] % MOD
pf={}
for i in range(2,int(m**0.5)+1):
    while m%i==0:
        pf[i]=pf.get(i,0)+1
        m//=i
if m>1:pf[m]=1
if n==1
print(1)
sys.exit()
Max=max(list(pf.values()))
f_mod=[1]*(Max+n+1)
f_mod_inverse=[1]*(Max+n+1)
for i in range(1,Max+n+1):
  f_mod[i]=(f_mod[i-1]*i)%MOD
  f_mod_inverse[i]=(f_mod_inverse[i-1]*inv_mod(i)) % MOD  
for i in pf.values():
  ans*=comb_mod(i+n-1,n-1)
print(ans%MOD)


### FIXED CODE ###

import sys
n,m=map(int,input().split())
MOD = 10**9+7
ans=1
if m==1:
  print(1)
  sys.exit()
def inv_mod(a, p=MOD):
    def inv_mod_sub(a, p):
        if a == 1:
            return 1, 0
        else:
            d, r = p//a, p%a
            x, y = inv_mod_sub(r, a)
            return y-d*x, x
    if p < 0: p = -p
    a %= p
    return inv_mod_sub(a,p)[0] % p

def comb_mod(n, k):
    if k < 0 or k > n:
        return 0
    else:
        return f_mod[n]*f_mod_inverse[k]*f_mod_inverse[n-k] % MOD
pf={}
for i in range(2,int(m**0.5)+1):
    while m%i==0:
        pf[i]=pf.get(i,0)+1
        m//=i
if m>1:pf[m]=1
Max=max(list(pf.values()))
f_mod=[1]*(Max+n+1)
f_mod_inverse=[1]*(Max+n+1)
for i in range(1,Max+n+1):
  f_mod[i]=(f_mod[i-1]*i)%MOD
  f_mod_inverse[i]=(f_mod_inverse[i-1]*inv_mod(i)) % MOD  
for i in pf.values():
  ans*=comb_mod(i+n-1,n-1)
print(ans%MOD)
# ABC044C - 高橋君とカード / Tak and Cards (ARC060C)
from collections import defaultdict


def main():
    N, A = tuple(map(int, input().split()))
    X = tuple(map(int, input().split()))
    Y = [i - A for i in X]
    D = defaultdict(int)
    D[0] = 1
    for i in Y:
        for j, k in D.items():
            D[i + j] += k
    print(D[0] - 1)


if __name__ == "__main__":
    main()

### FIXED CODE ###

# ABC044C - 高橋君とカード / Tak and Cards (ARC060C)
def main():
    N, A = tuple(map(int, input().rstrip().split()))
    X = tuple(map(int, input().rstrip().split()))
    x = max(X)
    # dp[i][j][k] := patterns to make k by j cards from X1, X2, ..., Xi
    dp = [[[0] * (N * 50 + 1) for _ in range(N + 1)] for _ in range(N + 1)]
    dp[0][0][0] = 1
    for i in range(N):
        for j in range(N):
            for k in range(N * 50 + 1):
                if dp[i][j][k]:
                    dp[i + 1][j][k] += dp[i][j][k]
                    dp[i + 1][j + 1][k + X[i]] += dp[i][j][k]
    ans = sum(dp[N][i][i * A] for i in range(1, N + 1))
    print(ans)


if __name__ == "__main__":
    main()
from itertools import*
from numpy import*
n,k=map(int,input().split())
k2=k+1
s=input()
if len(s)==1:
    if s=="1":
        print(1)
    else:
        print(0)
    exit()
x=[0]+[len(list(v))for k,v in groupby(s)if k=="0"]+[0]
y=[0]+[len(list(v))for k,v in groupby(s)if k=="1"]+[0]
x1=array(x[:-k])
x2=array(x[k:])
x3=sum(x[:k])
t=x3+cumsum(x2-x1)
y1=array(y[:-k2])
y2=array(y[k2:])
y3=sum(y[:k2])
f=y3+cumsum(y2-y1)
#print(x,y)
#print(t,f)
print(max(max(t+f),x3+y3))

### FIXED CODE ###

from itertools import*
from numpy import*
n,k=map(int,input().split())
k=2*k+1
s=input()
x=[0]*(s[0]=="0")+[len(list(v))for k,v in groupby(s)]+[0]*(s[-1]=="0")
#print(x)
x1=array(x[k:])
x2=array(x[:-k])
x3=sum(x[:k])
y=[x3]+list(x3+cumsum(x1-x2))
print(max(y[::2]))
A, B = map(int, input().split())

for k in range(max(A, B)):
  if abs(A - k) == abs(B - k):
    print(k)
    return
    
print("IMPOSSIBLE")

### FIXED CODE ###

A, B = map(int, input().split())
     
if (A + B) % 2 == 0:
  print((A + B) // 2)
else:
  print("IMPOSSIBLE")
a=input()
a=float(a)

p=math.pi

b= a*a*p
c= a*2*p
print('%03.7f' % b,'%03.7f' % c)

### FIXED CODE ###

import math
a=input()
a=float(a)

p=math.pi

b= a*a*p
c= a*2*p
print('%03.7f' % b,'%03.7f' % c)
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = [int(input()) for _ in range(M)]
ans = [0 for _ in range(N+1)]
ans[0] = 0
if 1 not in A:
  ans[1] = 1
if 2 not in A:
  ans[2] = ans[1] + 1

for i in range(3, N+1):
  if i in A:
    ans[i] = 0
    continue
  for j in (1, 2):
    if ans[i-j] != 0:
      ans[i] += ans[i-j]
  else:
    ans[i] %= (10 ** 9 + 7)
print(ans[-1] % (10 ** 9 + 7))


### FIXED CODE ###

import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = set([int(input()) for _ in range(M)])
s = [0 for _ in range(N + 1)]
s[0] = 1
if 1 not in A:
  s[1] = 1

for n in range(2, N+1):
  if n in A:
    continue
  else:
    s[n] = s[n-1] + s[n-2]
print(s[-1] % (10 ** 9 + 7))
import sys
input = sys.stdin.readline
sys.setrecursionlimit(200000)
from collections import defaultdict
from bisect import bisect_left


def read():
    N = int(input().strip())
    A = list(map(int, input().strip().split()))
    return N, A


def sieve(n):
    """
    n以下の素数を昇順に列挙する
    """
    is_prime = [True for i in range(n+1)]
    primes = []
    for i in range(2, n+1):
        if is_prime[i]:
            primes.append(i)
            for j in range(i+i, n+1, i):
                is_prime[j] = False
    return primes


def solve(N, A, AMAX=10**3):
    A.sort()
    primes = sieve(AMAX)
    P = len(primes)
    table = [[False for i in range(P)] for j in range(N)]
    L = [[False for i in range(P)] for j in range(N+1)]
    for i in range(N):
        a = A[i]
        for j in range(P):
            p = primes[j]
            if p * p > a:
                break
            while a % p == 0:
                table[i][j] = True
                a //= p
        if a > 1:
            idx = bisect_left(primes, a)
            table[i][idx] = True
    for i in range(N):
        for j in range(P):
            L[i+1][j] = L[i][j] ^ table[i][j]

    ans = 0
    A.append(A[-1])
    for i in range(N):
        not_div = True
        if A[i] == A[i+1]:
            continue
        for j in range(P):
            if table[i][j] and (i > 0 and L[i-1][j]):
                not_div = False
                break
        if not_div:
            ans += 1
    return ans


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(200000)
from collections import defaultdict
from bisect import bisect_left


def read():
    N = int(input().strip())
    A = list(map(int, input().strip().split()))
    return N, A


def prime_factorization(n, primes):
    """
    nの素因数分解を求める
    """
    prime_factors = defaultdict(int)
    if n < 2:
        return prime_factors
    for p in primes:
        if p * p > n:
            break
        while n % p == 0:
            prime_factors[p] += 1
            n //= p
    if n > 1:
        prime_factors[n] = 1
    return prime_factors


def sieve(n):
    """
    n以下の素数を昇順に列挙する
    """
    is_prime = [True for i in range(n+1)]
    primes = []
    for i in range(2, n+1):
        if is_prime[i]:
            primes.append(i)
            for j in range(i+i, n+1, i):
                is_prime[j] = False
    return primes


def solve(N, A):
    A.sort()
    AMAX = max(A)
    ans = 0
    is_div = [True for i in range(AMAX+1)]
    for i in range(N):
        a = A[i]
        if is_div[a]:
            if not ((i > 0 and A[i] == A[i-1]) or (i < N-1 and A[i] == A[i+1])):
                ans += 1
            for j in range(a, AMAX+1, a):
                is_div[j] = False
    return ans


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))
n=int(input())
for i in range(15):
  for j in range(26):
    if i*7+j*4=n:
      print('Yes')
      exit()
print('No')

### FIXED CODE ###

n=int(input())
for i in range(15):
  for j in range(26):
    if i*7+j*4==n:
      print('Yes')
      exit()
print('No')
s = input()
ans = ""
for i in range(0, len(s), 2):
  ans = ans + i
print(ans)


### FIXED CODE ###

s = input()
ans = ""
for i in range(0, len(s), 2):
  ans = ans + s[i]
print(ans)
import sys
sys.setrecursionlimit(10000)
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

ps = [n, 0, 0, 0, 0, 0]
ts = [a, b, c, d, e]
t = 0

def move(ps, t):
    if ps[len(ps)-1] == n:
        return print(t)
    ds = [0, 0, 0, 0, 0, 0]
    for i in range(len(ps) - 1):
        if ps[i] > 0:
            diff = min(ts[i], ps[i])
            ds[i] -= diff
            ds[i + 1] += diff
    move([ps[j] + ds[j]  for j in range(len(ds))], t +1)

move(ps, t)


### FIXED CODE ###

n = int(input())
a = [int(input()) for i in range(5)]
ma = min(a)
s = n // ma
if n % ma:
  s += 1
print(4 + s)
import math

n = int(input())
list = {}
while n>1:
    for i in range(math.sqrt(n)):
        if n%i==0:
            if i in list:
                list[i] = list[i]+1
            else:
                list[i] = 1
            break
if n%i==0:
    if i in list:
        list[i] = list[i]+1
    else:
        list[i] = 1
ans = 0
for i in list.keys():
    m = list[i]
    for j in range(m):
        if not j>m:
            ans += j
            m -= j
        else:
            break
print(ans)


### FIXED CODE ###

import math

n = int(input())
list = {}
flag = True
while flag:
    flag = False
    for i in range(2,int(math.sqrt(n)+2)):
        if n%i==0:
            if i in list:
                list[i] = list[i]+1
            else:
                list[i] = 1
            n /= i
            flag = True
            break
if n>1:
    if n in list:
        list[n] = list[n]+1
    else:
        list[n] = 1
ans = 0
for i in list.keys():
    m = list[i]
    for j in range(1,m+1):
        if not j>m:
            ans += 1
            m -= j
        else:
            break
print(ans)
a,b,k=int(list(input().split()))
if a>=k:
  a-=k
  k=0
  print(a," ",b)
  exit()
a=0
k-=a
b-=k
print(a," ",b)


### FIXED CODE ###

a,b,k=list(map(int,input().split()))
if a>=k:
  a-=k
  print(a," ",b)
  exit()

k-=a
a=0
b-=k
b=max(b,0)
print(a," ",b)
n=int(input())
arr=list(map(int,input().split()))
arr2=lisT9map(int,input().split())
ans=0
for i in range(n):
	if(arr[i]-arr2[i]>0):
		ans+=arr[i]-arr2[i]

	#ans=max(ans,arr[i]-arr2[i])
print(ans)


### FIXED CODE ###

n=int(input())
arr=list(map(int,input().split()))
arr2=list(map(int,input().split()))
ans=0
for i in range(n):
	if(arr[i]-arr2[i]>0):
		ans+=arr[i]-arr2[i]

	#ans=max(ans,arr[i]-arr2[i])
print(ans)
# 計算量爆発パターン
D = 1000000007
n, m = map(int, input().split())
a = [0] * (10**5 + 1)
for i in range(m):
    a[int(input())] += 1

# 初期値
s0 = 1
if (a[1] == 1):
    s1 = 0
else:
    s1 = 1


def calc(n):
    if (n == 0):
        return s0
    elif (n == 1):
        return s1
    elif (a[n] == 1):
        return 0
    else:
        return (calc(n - 1) + calc(n - 2)) % D


print(calc(n))


### FIXED CODE ###

#! /Library/Frameworks/Python.framework/Versions/3.7/bin/python3
D = 1000000007
n, m = map(int, input().split())
a = [0] * (10**5 + 1)
for i in range(m):
    a[int(input())] += 1

# 初期値
s = [0] * (n + 1)
s[0] = 1
if (a[1] == 1):
    s[1] = 0
else:
    s[1] = 1

# 暫定結果を格納する配列


def calc(n):
    if(a[n] == 1):
        return 0
    else:
        return (s[n - 1] + s[n - 2]) % D


def solver(n):
    for i in range(2, n + 1):
        s[i] = calc(i)


solver(n)
print(s[n])
S = input()
  if S == 'ARC':
     print('ABC')
  elif S == 'ABC':
       print('ARC')

### FIXED CODE ###

S = input()
if S == "ARC":
   print("ABC")
elif S == "ABC":
     print("ARC")
import itertools
num = int(input())
array1 = tuple(map(int, input().split()))
array2 = tuple(map(int, input().split()))
all_list = list(itertools.permutations(range(num)))
 
array1_index = all_list.index(array1) + 1
array2_index = all_list.index(array2) + 1
 
if array1 > array2:
  print(array1-array2)
else:
  print(array2-array1)

### FIXED CODE ###

import itertools
num = int(input())
array1 = tuple(map(int, input().split()))
array2 = tuple(map(int, input().split()))
all_list = list(itertools.permutations(range(1, num + 1)))
 
array1_index = all_list.index(array1) + 1
array2_index = all_list.index(array2) + 1
 
if array1_index > array2_index:
  print(array1_index-array2_index)
else:
  print(array2_index-array1_index)
def segfunc(x, y):
    return min(x, y)

class segment_():
    def __init__(self, init_val, n, segfunc):
        self.ide_ele = 10**9+1
        # num: n以上の最小の2のべき乗
        self.num = 2**(n-1).bit_length()
        self.seg = [self.ide_ele]*2*self.num
        self.segfunc = segfunc
        # set_val
        for i in range(n):
            self.seg[i+self.num-1] = init_val[i]
        # built
        for i in range(self.num-2, -1, -1):
            self.seg[i] = self.segfunc(self.seg[2*i+1], self.seg[2*i+2])

    def update(self, k, x):
        k += self.num - 1
        self.seg[k] = x
        while k:
            k = (k-1)//2
            self.seg[k] = self.segfunc(self.seg[2*k+1], self.seg[2*k+2])

    def query(self, p, q):
        if q <= p:
            return self.ide_ele
        p += self.num - 1
        q += self.num - 2
        res = self.ide_ele
        while q-p>1:
            if p&1 == 0:
                res = self.segfunc(res, self.seg[p])
            if q&1 == 1:
                res = self.segfunc(res, self.seg[q])
                q -= 1
            p = p//2
            q = (q-1)//2
        if p == q:
            res = self.segfunc(res, self.seg[p])
        else:
            res = self.segfunc(self.segfunc(res, self.seg[p]), self.seg[q])
        return res

def main():
    n, x = list(map(int,sys.stdin.readline().split()))
    A = list(map(int,sys.stdin.readline().split()))

    seg_ = segment_(A, n, lambda a, b: min(a, b))
    ans = 10**18
    for k in range(n):
        t = k*x
        for i in range(n):
            if k <= i:
                t += seg_.query(i-k, i+1)
            else:
                t += min(seg_.query(0, i+1), seg_.query(n-(k-i), n))
        ans = min(t, ans)
    print(ans)

if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys

n, x = map(int,sys.stdin.readline().split())
A = list(map(int,sys.stdin.readline().split()))

ans = 10**18
mins = [a for a in A]
for k in range(n):
    for i in range(n):
        if k <= i:
            mins[i] = min(A[i-k], mins[i])
        else:
            mins[i] = min(A[n-(k-i)], mins[i])
    ans = min(sum(mins)+k*x, ans)
print(ans)
x,n  = map(int,input().split())
if(n==0):
    print(x)
else:

    p = list(map(int,input().split()))
    l = list(range(1,101))

    rl =  set(l)-set(p)
    m = 100
    for i in  rl:
        if(abs(i-x) < m):
            m = abs(i-x)
            ans = i
    print(ans)

### FIXED CODE ###

X, N = map(int, input().split())
P = list(map(int, input().split()))

Q = [q for q in range(-1, 102) if q not in P]  # -1以上101以下整数のうちPに存在しないもの
ans = min(Q, key=lambda q: (abs(q - X), q))  # maspyさん解法
print(ans)
ls = list(map(int, input().split()))
nokori = ls[-1]
sum_max = 0
for i, j in zip(ls[:-1], [1, 0, -1]):
    nokori -= i
    if nokori >= 0:
        sum_max += i*j
    else:
        sum_max += nokori_*j
        break
    nokori_ = nokori
print(sum_max)


### FIXED CODE ###

ls = list(map(int, input().split()))
nokori = ls[-1]
nokori_ = ls[-1]
sum_max = 0
for i, j in zip(ls[:-1], [1, 0, -1]):
    nokori -= i
    if nokori > 0:
        sum_max += i*j
    elif nokori == 0:
        sum_max += i*j
        break
    else:
        sum_max += nokori_*j
        break
    nokori_ = nokori
print(sum_max)
n = input()
s = list(map(int, input().split()))
ans = 1
if 0 in ans:
  print(0)
else:
  for i in s:
    if ans > 10**18:
      break
    ans *= int(i)
  if ans > 10**18:
    print(-1)
  else:
    print(ans)



### FIXED CODE ###

n = int(input())
arr = list(map(int, input().split()))
total = 1
if 0 in arr:
    print(0)
else:
    for num in arr:
        if total > 10**18:
            break
        total *= num
    if total > 10**18:
        print(-1)
    else:
        print(total)
N=int(input())
D=list(map(int,input().split()))
M=int(input())
T=list(map(int,input().split()))
for i in range(N):
  if D[i] in T:
    T.remove(D[i])
    D.pop(i)
    if len(T)==0:
      break
if len(T)==0:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

from collections import Counter
N=int(input())
D=list(map(int,input().split()))
d=Counter(D)
M=int(input())
T=list(map(int,input().split()))
t=Counter(T)
ans="YES"
for k in list(t.keys()):
  if d[k]<t[k]:
    ans="NO"
    break
print(ans)
if __name__ == '__main__':


### FIXED CODE ###


def Same_Integers(abc):

    ans = 0
    abc.sort()
    count = abc[2]*3 - abc[0] - abc[1] - abc[2]

    if count % 2 == 0:
        ans = int(count / 2)
    else:
        ans = int((count + 3) // 2)

    return ans

def main():
    abc = list(map(int , input().split()))
    print(Same_Integers(abc))

if __name__ == '__main__':
    main()
a,b,c=map(int,input().split())
if a==b:
  if b==c:
    ans="No"
  else:
    ans="Yes"
if b==c:
  if c==a:
    ans="No"
  else:
    ans="Yes"
if c==a:
  if a==b:
    ans="No"
  else:
    ans="Yes"
print(ans)    

### FIXED CODE ###

a,b,c=map(int,input().split())
ans="No"
if a==b:
  if b==c:
    ans="No"
  else:
    ans="Yes"
if b==c:
  if c==a:
    ans="No"
  else:
    ans="Yes"
if c==a:
  if a==b:
    ans="No"
  else:
    ans="Yes"
print(ans)
def main () :
        a,b =  [int(i) for i in input().split()]
    if a < b :
        print( "a < b")
    elif a > b :
        print("a > b")
    else :
        print("a == b")

if__name__=='__main__':
    main()

### FIXED CODE ###

def main () :
    a, b = [int(i) for i in input().split()]
    if a < b :
        print( "a < b")
    elif a > b :
        print("a > b")
    else :
        print("a == b")

if __name__=='__main__':
    main()
n=int(input())
b = list(map(int, input().split()))
ans=[]
dl = -1
for num in range(n):
    for i in range(len(b)):
        if b[i] == i+1:
            dl=i
    if dl==-1:
        print(-1)
        exit()
    b.pop(dl)
    ans.append(dl+1)
ans = list(reversed(ans))
for i in ans:
    print(i)

### FIXED CODE ###

n=int(input())
b = list(map(int, input().split()))
ans=[]
for num in range(n):
    dl=-1
    for i in range(len(b)):
        if b[i] == i+1:
            dl=i
    if dl==-1:
        print(-1)
        exit()
    b.pop(dl)
    ans.append(dl+1)
ans = list(reversed(ans))
for i in ans:
    print(i)
# input
print("input A:")
inputA = int(input())
print("input B:")
inputB = int(input())

# calc
if ((inputA*inputB)% 2 == 0):
  print("Even")
elif((inputA*inputB)% 2 == 1):
  print("Odd")

### FIXED CODE ###

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

# calc
if (A * B % 2 == 0):
  print("Even")
else:
  print("Odd")