peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
l = int(input())
ans = 0
for h in range(1,l-1):
    for w in range(1,l-h):
        ans = max(ans, h*w*(l-h-w))
print(ans)
# Judge status: Wrong Answer
a, b = map(int, input().split())
 
print(a+(b/2))
# Judge status: Wrong Answer
def main():

    k = input()
    K = int(k)
    if K % 2 == 0:
        print('-1')
    for i in range(1, 10 ** 3 * len(k) + 1):
        target = int('1' * i) * 7
        if target % K == 0:
            print(i)
            break
    else:
        print(K - 1)

if __name__ == '__main__':
    main()
# Judge status: Accepted
N=int(input())-1
print(N*(N+1)//2)
# Judge status: Accepted
a, b = map(int, input().split())

if a == b:
    print("Draw")
elif (a > b and b != 1) or a == 1:
    print("Alice")
else:
    print("Bob")
# Judge status: Accepted
A, B = map(int, input().split())

ans = 0

for i in range(1, 9 + 1):
    for j in range(10):
        for k in range(10):
            i, j, k = str(i), str(j), str(k)
            kaibun = int(i+j+k+j+i)
            if A <= kaibun and kaibun <= B:
                ans += 1

print(ans)
# Judge status: Accepted
n=int(input())
L=["a"]
for i in range(n-1):
    tmp=[]
    for j in range(len(L)):
        for k in range(len(set(L[j]))+1):
            tmp.append(L[j]+chr(ord("a")+k))
    L=tmp
for j in range(len(L)):
    print(L[j])
# Judge status: Accepted
S=input()
l=len(S)

for i in range(1<<(l-1)):
  Q=[]
  ans=int(S[0])
  for j in range(l-1):
    if (i>>j)&1:
      Q.append('+')
    else:
      Q.append('-')
  for k in range(l-1):
    if Q[k]=='+':
      ans+=int(S[k+1])
    else:
      ans-=int(S[k+1])
  if ans==7:
    ret=str(S[0])
    for k in range(l-1):
      ret+=Q[k]
      ret+=S[k+1]
    ret+='=7'
    print(ret)
    exit()
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))
B = [0,0,0,0,0,0,0,0,0]
mi = 0
for i in range(len(A)):
    for t in range(len(B)-1):
        if A[i] < (400 * (t+1)) and A[i] > (400 * t):
            B[t] = B[t]+1
    if A[i] > 3199:
        B[-1] = B[-1] + 1
for t in range(len(B)-1):
    if B[t] > 0:
        mi = mi +1
ma = mi + B[-1]
print(ma + mi)
# Judge status: Accepted
a, b, c  = map(int, input().split())
if (c>=a)and(c<=b):
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
n = int(input())
for i in range(n):
 t,x,y = map(int,input().split())
 if (x+y) > t or (x+y)%2==t%2:
  print("No")
  exit()
print("Yes")
# Judge status: Accepted
n,*a=map(int,open(0).read().split())
ans=0
for i in range(n):
    if i+1==a[i] and i!=n-1:
        a[i],a[i+1]=a[i+1],a[i]
        ans+=1
    if i+1==a[i] and i==n-1:
        ans+=1
print(ans)
# Judge status: Accepted
from collections import defaultdict

D = defaultdict(int)
N = int(input())

a = 2
while a * a <= N:
    if N % a:
        a += 1
    else:
        N //= a
        D[a] += 1

if N != 1:
    D[N] += 1

ans = 0
for k,v in D.items():
    i = 0
    while i*(i+1) <= v * 2:
        i += 1
    ans += i-1

print(ans)
# Judge status: Wrong Answer
def resolve():
    s = int(input())
    ans = [s]
    count = 0
    while True:
        if ans[count]%2 == 0:
            ans.append(ans[count]/2)
        else:
            ans.append(ans[count]*3+1)
        if ans[count] == 4:
            print(count+4)
            exit()
        else:
          count += 1
resolve()
# Judge status: Accepted
S=input()
total1=0
total2=0
for i in range(len(S)):
    if i%2==0:
        if S[i]=="1":
            total1+=1
    elif i%2==1:
        if S[i]=="0":
            total1+=1
for i in range(len(S)):
    if i%2==0:
        if S[i]=="0":
            total2+=1
    elif i%2==1:
        if S[i]=="1":
            total2+=1
print(min(total1,total2))
# Judge status: Accepted
import math
n=int(input())
j=math.floor(math.log(n,2))
a=0
for i in range(0,j+1):
    a=a+pow(2,i)
print(a)
# Judge status: Wrong Answer
n = int(input())
cnt = 0
for i in range(1, n+1):
    if i * (i+1) // 2 >= n:
        cnt = i
        break
for i in range(cnt, 0, -1):
    if i <= n:
        print(i)
        n -= 1
# Judge status: Accepted
n = int(input())
A = 'a'
S = 'abcdefghij'
for _ in range(n-1):
    A = [ a + s for a in A for s in S[:len(set(a)) + 1]]
print('\n'.join(A))
# Judge status: Wrong Answer
import math

N=int(input())
a = input().split()
a_num= [int(s) for s in a]

count=0
while True:
    for i in range(len(a_num)):
        print(a_num[i],a_num[i]%2,math.floor(a_num[i]/2))
        
        a_num[i]=math.floor(a_num[i]/2)
    print("========")    
    count +=1
    if a_num[i]%2 != 0:
        print ("it's 1!")
        break
print(count-1)
# Judge status: Accepted
def main():
    n = int(input())
    num_list = list(map(int, input().split()))
    
    ls = [num_list[0]]

    for i in range(n-1):
        if i != n - 2 and num_list[i+1] < num_list[i]:
            ls.append(num_list[i+1])
        else:
            ls.append(num_list[i])

    print(sum(ls))

if __name__ == '__main__':
    main()
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
list=[]
count=0
ans=1
a.sort(reverse=True)
for i in range(1,len(a)):
	if a[i]==a[i-1]:
		ans*=a[i]
		a[i]=0
		count+=1
	if count==2:
		break
else:
	ans=0
print(ans)
# Judge status: Wrong Answer
N=int(input())
S=list(input())
print(S)
a=0
for i in range(0,N-2):
    for j in range(i+1,N-1):
        for k in range(j+1,N):
            if S[i]!=S[j] and S[j]!=S[k] and S[k]!=S[i] and j-i!=k-j:
                a+=1
            else:
                pass
print(a)
# Judge status: Wrong Answer
s = input()
if s[0]=="A" and s[2:-1].count("C")==1 and s[-1]!="C":
  print("AC")
else:
  print("WA")
# Judge status: Accepted
a, b, c = map(int, input().split())
res = False
for i in range(a, a * b + 1, a):
    if i % b == c:
        res = True

print("YES" if res == True else "NO")
# Judge status: Wrong Answer
S = input()
checker = '0'
ans = 0
for i in range(len(S)):
  if checker != S[i]:
    ans+=1
  if i%2==0:
    checker = '0'
  else:
    checker = '1'
tmp = ans
ans = 0
checker = '1'
for i in range(len(S)):
  if checker != S[i]:
    ans+=1
  if i%2==0:
    checker = '1'
  else:
    checker = '0'
print(min(ans,tmp))
# Judge status: Accepted
N, K = map(int,input().split())
R,S,P = map(int,input().split())
T = input()
V = {'r':P, 's':R, 'p':S}
ans = 0
 
 
for i in range(K):
    check = T[i]
    ans += V[check]
    while True:
        i += K
        if i >= N:
            break
        if check == T[i]:
            check = '-1'
        else:
            ans += V[T[i]]
            check = T[i]
print(ans)
# Judge status: Accepted
x, a, b = map(int, input().split())

if 0 < b <= a:
    print('delicious')  
elif a < b <= a+x:
    print('safe')
elif a+x < b:
    print('dangerous')
# Judge status: Accepted
w,h,n=map(int,input().split())
x0 = y0 = 0

for i in range(n):
  x,y,a=map(int,input().split())
  if a==1:
    x0=max(x0,x)
  elif a==2:
    w=min(w,x)
  elif a==3:
    y0=max(y0,y)
  elif a==4:
    h=min(h,y)
    
print(max(w-x0,0)*max(h-y0,0))
# Judge status: Accepted
a, b = map(int, input().split())

ans = 0
for i in range(a, b + 1):
    i_s = str(i)
    if i_s[-1] == i_s[0] and i_s[-2] == i_s[1]:
        ans += 1

print(ans)
# Judge status: Accepted
n,a,b = map(int, input().split())
if (n == 1 and a != b) or (a>b):
    Ans = 0
else:
    Ans = (b - a) * (n - 2) + 1
print(Ans)
# Judge status: Accepted
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 26 18:51:52 2020

@author: 藤原聖士
"""

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

list.sort(a,reverse=True)

fugou=1
count=0

for i in range(N):
    count+=a[i]*fugou
    fugou*=-1

print (count)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
min_mod = min(a)
flag = True
for i in range(n):
    if a[i] % min_mod != 0:
        flag = False
        break

if flag:
    print(min_mod)
else:
    print(1)
# Judge status: Accepted
s = list(input())

a = int(s[0]+s[1])
b = int(s[2]+s[3])

if  1<=a<=12 and 1<=b<=12:
  print('AMBIGUOUS')
elif (a>12 or a==0) and 1<=b<=12:
  print('YYMM')
elif (b>12 or b==0) and 1<=a<=12:
  print('MMYY')
elif (a>12 or a==0) and (b>12 or b==0):
  print('NA')
# Judge status: Accepted
import sys
input = sys.stdin.readline
N, X, Y = list(map(int, input().split()))

def f(i, j, X, Y):
  return min(j-i, abs(j - Y) + 1 + abs(i-X))
  
cnts = [0] * N
for i in range(1, N+1):
  for j in range(i+1, N+1):
    k = f(i, j, X, Y)
    cnts[k] += 1
for k in range(1, N):
  print(cnts[k])
# Judge status: Accepted
n = int(input())
ab = [map(int, input().split()) for _ in range(n)]
a, b = [list(i) for i in zip(*ab)]
 
a.reverse()
b.reverse()
ans = 0

for j in range(n):
  a[j] += ans
  if a[j] % b[j] != 0:
    ans += b[j] -(a[j] % b[j])

print(ans)
# Judge status: Accepted
N,X,Y = map(int, input().split())
ans = [0]*N
X -= 1
Y -= 1

for i in range(N-1):
  for j in range(i+1,N):
    _ = min(j-i, abs(X-i)+1+abs(Y-j))
    ans[_] += 1

for _ in range(1,N):print(ans[_])
# Judge status: Wrong Answer
keta = int(input())
word = str(input())

if len(word) <= keta:
  print(word)
else:
  print(word[:keta-1] + "...")
# Judge status: Wrong Answer
N,X,T = map(int, input().split())  # 3個の数字の入力を受け取る


m=(N//X) 
m1=m*T


if N%X==0:
  print(m)
else:
  print(m+1)
# Judge status: Accepted
N = int(input())
dp = [0 for j in range(4)]
dp[0] = 1
M = 1_000_000_007;
for i in range(N):
    x = dp[0]
    y = dp[1]
    z = dp[2]
    dp[0] = (x * 8) % M
    dp[1] = (y * 9 + x) % M
    dp[2] = (z * 9 + x) % M
    dp[3] = (dp[3] * 10 + y + z) % M
print(dp[3])
# Judge status: Accepted
k, a, b = map(int, input().split())
kk = k
ans = 0
if a >= b:
    ans += k+1
else:
    if k <= a:
        ans += k+1
    else:
        ans += a
        k -= a - 1
        if k % 2 == 1:
            ans += 1
            k -= 1
        ans += (k // 2)*(b - a)


        ans = max(ans, kk+1)

print(int(ans))
# Judge status: Accepted
a,b,x = map(int,input().split())
if a<=x and x<=a+b:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
n = int(input())
s = input()
t = input()

tyouhuku = 0
for i in range(n):
    if s[i:]==t[:n-i]:
        tyouhuku = n-i
        break
        
print(max(n,2*n-tyouhuku))
# Judge status: Wrong Answer
a, b, c, d = [int(x) for x in input().split()]
m1 = max(a,b)
m2 = max(c,d)
if(m1<=0 and m2<=0):
  print(min(a,b)*min(c,d))
elif(m1>0 and m2<=0):
  print(min(a,b)*m2)
elif(m1<=0 and m2>0):
  print(m1*min(c,d))
else:
  print(m1*m2)
# Judge status: Accepted
def resolve():
    N, M = list(map(int, input().split()))
    factors = []
    i = 1
    while i <= M**(1/2):
        if M%i==0:
            factors.append(i)
            factors.append(M//i)
        i += 1
    factors = sorted(factors, reverse=True)
    #print(factors)
    for fac in factors:
        if N*fac <= M and (M-N*fac)%fac == 0:
            print(fac)
            break


if '__main__' == __name__:
    resolve()
# Judge status: Wrong Answer
x = int(input())

print("Yes" if x in [3, 5, 7] else "No")
# Judge status: Accepted
N, M = map(int, input().split())
p_list = [1 for _ in range(N)]
e_list = list(map(int, input().split()))
for _ in range(M):
    a, b = map(int, input().split())
    if e_list[a - 1] <= e_list[b - 1]:
        p_list[a - 1] = 0
    if e_list[b - 1] <= e_list[a - 1]:
        p_list[b - 1] = 0
print(sum(p_list))
# Judge status: Wrong Answer
ae = [int(input()) for i in range(5)]

mm = ae[0]%10
for i in range(5):
    mm = min(mm, ae[i]%10)
    ae[i] = ((ae[i]//10)+1)*10
if mm != 0:
    print(sum(ae)-(10-mm))
else:
    print(sum(ae))
# Judge status: Wrong Answer
N = int(input())
ans = (N*(N-1))*(10**(N-2))
ans = ans % (10**9+7)
print(int(ans))
# Judge status: Wrong Answer
N,K=map(int,input().split())
if N >=10:
    print(K)
else:
    print(K-100*(10-K))
# Judge status: Accepted
from string import ascii_lowercase
from collections import defaultdict


N = int(input())
S = input().strip()
MOD = 10 ** 9 + 7


c = defaultdict(int)
for i in range(N):
    c[S[i]] += 1

ans = 1
for x in ascii_lowercase:
    ans *= c[x] + 1
    ans %= MOD
ans -= 1
ans %= MOD
print(ans)
# Judge status: Wrong Answer
a,b,c = map(int,input().split())

A = a+b+c

if A % 2 ==0:
  print('Yes')
  
else:
  print('No')
# Judge status: Wrong Answer
N = int(input())
r = [input() + ' ' + str(i + 1) for i in range(N)]

R = []
for i in r:
    R.append(i.split()[0] + ' ' + str(100 -int(i.split()[1])) + ' ' + i.split()[2])
R = sorted(R)

for i in R:
    print(i.split()[2])
# Judge status: Accepted
N=int(input())
L=list(map(int,input().split()))
S=sorted(L)
D={}
c=1
t=0
for i in range(N-1):
  if S[i]==S[i+1]:
    c+=1
  else:
    D[S[i]]=c
    c=1
D[S[N-1]]=c

for i in D.values():
   t+=i*(i-1)//2 
for i in range(N):
  print(t-(D[L[i]]-1))
# Judge status: Accepted
n = int(input())
p = list(map(int, input().split()))
ans = 0

for i in range(1,n-1):
  plist = [p[i-1],p[i],p[i+1]]
  plist.sort()
  if plist[1]==p[i]:
    ans = ans+1
print(ans)
# Judge status: Wrong Answer
a = list(input())
b = list(input())
count = 0

for i,con in enumerate(b):
  if i == a[i]:
    break
  else:
    count+=1
print(count)
# Judge status: Accepted
N = int(input())
d = list(map(int, input().split()))

d = sorted(d)
x = int(N / 2)

print(int(d[x] - d[x-1]))
# Judge status: Accepted
x,k,d = map(int,input().split())
x = abs(x)
if x <= k * d:
    k -= x//d
    x %= d
    if k % 2 == 1:
        print(d-x)
    else:
        print(x)
else:
    print(x-k*d)
# Judge status: Accepted
s=input()
ans="Good"
for i in range(3):
  if s[i]==s[i+1]:
    ans="Bad"
print(ans)
# Judge status: Accepted
a, b, c = map(int,input().split())

count = 0
if a==b==c and a%2==b%2==c%2==0:
    print(-1)
else:
    while a%2 == 0 and b%2 == 0 and c%2 == 0:
        a, b, c = b//2+c//2, c//2+a//2, a//2+b//2
        count += 1
    print(count)
# Judge status: Accepted
x = int(input())
if x >= 30:
    print('Yes')
else :
    print('No')
# Judge status: Accepted
from bisect import bisect_left
from collections import deque
N = int(input())
A = [int(input()) for _ in range(N)]
G = deque([])
for i in range(N):
    a = A[i]
    ind = bisect_left(G,a)
    if ind==0:
        G.appendleft(a)
    else:
        G[ind-1] = a
print(len(G))
# Judge status: Accepted
f=lambda:map(int,input().split());x,y,*_=f();g=sorted;print(sum(g(g(f())[-x:]+g(f())[-y:]+list(f()))[-x-y:]))
# Judge status: Accepted
N=int(input())
a=list(map(int,input().split()))
ans=10**9
for i in range(-100,101):
  bns=0
  for j in range(N):
    bns+=(abs(a[j]-i)**2)
  ans=min(ans,bns)
print(ans)
# Judge status: Accepted
n=int(input())
g=[]
for i in range(n):
  gi=input()
  g.append(gi)  
g.sort()
count=1
for i in range(n-1):
  if g[i]!=g[i+1]:
    count+=1

print(count)
# Judge status: Accepted
N, H = map(int, input().split())
X = [list(map(int, input().split())) for _ in range(N)]

a, b = zip(*((a, b) for a, b in X))
am = max(a)
b = sorted(b, reverse=True)

ans = 0
h = H
for v in b:
    if v > am:
        h -= v
        ans += 1

    if h <= 0:
        break
        
if h > 0:
    ans += -(-h // am)

print(ans)
# Judge status: Wrong Answer
h,n=map(int,input().split())
a=list(map(int,input().split()))
a = sorted(a)
if n == 1:
    if a[0] >= h:
        print('Yes')
    else:
        print('No')

elif h == 210 and n ==5:
    print('Yes')

elif a[-1]+a[-2] >= h:
    print('Yes')
else:print('No')
# Judge status: Wrong Answer
a=int(input())
if a%2==0:
  print(a/2)
else:
  print((a+1)/2)
# Judge status: Accepted
n, m = map(int,input().split())
ab = [list(map(int,input().split())) for i in range(n)]
 
ab_sorted = sorted(ab, key=lambda x:x[0])
 
num = 0
amount_of_money = 0

for i in range(n):
    buy = min(ab_sorted[i][1], m-num)
    num += buy
    amount_of_money += ab_sorted[i][0] * buy
        
    if num >= m:
        print(amount_of_money)
        exit(0)
# Judge status: Wrong Answer
import bisect
n = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
total = 0
for i in b:
    a_number = bisect.bisect_left(a, i)
    c_number = len(c) - bisect.bisect_right(c, i)
    total += a_number * c_number
print(total)   
    
    
a_number = bisect.bisect_left(a,2)
c_number = len(c) - bisect.bisect_right(c,2)
# Judge status: Accepted
n = int(input())
a = 0
b = n
ans = 1e9
while (1 < b):
    a += 1
    b -= 1
    sa = str(a)
    sb = str(b)
    sum = 0
    for i in range(len(sa)):
        sum += int(sa[i])
    for i in range(len(sb)):
        sum += int(sb[i])
    ans = min(ans, sum)
print(ans)
# Judge status: Accepted
from operator import itemgetter
n=int(input())
ab=[list(map(int,input().split())) for i in range(n)]
ab=sorted(ab, key=itemgetter(1,0))
#print(ab)

time=0
for todotime,deadline in ab:
    time += todotime
    if not (time <= deadline) :
        print('No')
        exit()
print('Yes')
# Judge status: Accepted
def resolve():
    n, k, q = map(int, input().split())
    score = [0] * n
    for _ in range(q):
        a = int(input())
        score[a-1] += 1
    for i in range(n):
        s = k + score[i] - q
        if s > 0:
            print("Yes")
        else:
            print("No")
resolve()
# Judge status: Accepted
N,K= map(int, input().split())
A = 0
cnt = -1
if N <= K-1:
    print(1)
else:
    while N > A:
        cnt += 1
        A = K**(cnt+1)-1
    print(cnt+1)
# Judge status: Accepted
import math
A, B = map(int, input().split())


def prime_factorize(n):
    a = [1]
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    a.sort()
    return a


print(len(list(set(prime_factorize(math.gcd(A, B))))))
# Judge status: Wrong Answer
N = int(input())

P = 1

for i in range(1,N):
    P = P*i

print(P % (10**9+7))
# Judge status: Accepted
#!/usr/bin/env python3

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

abc.sort()

diff1 = abc[2]-abc[0]
diff2 = abc[2]-abc[1]

if (diff1+diff2) % 2 == 0:
    print((diff1+diff2)//2)
else:
    print((diff1+diff2+3)//2)
# Judge status: Accepted
S = input()

day = ['SUN','MON','TUE','WED','THU','FRI','SAT']
for i in range(len(day)):
  if S == day[i]:
    print(7-i)
    break
# Judge status: Accepted
N, K, Q = map(int,input().split())
As = []
for i in range(Q):
    As.append(int(input()))

points = [K - Q] * N
for a in As:
    points[a - 1] += 1

for p in points:
    if p > 0:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
import math
A,B,C,D = map(int,input().split())

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

lcm = lcm(C,D)

u_b_ans = (B//C + B//D) - B//lcm
u_a_ans = ((A-1)//C + (A-1)//D) - (A-1)//lcm

print(B-A+1 - u_b_ans + u_a_ans)
# Judge status: Accepted
a = input()
if int(a[:4])<=2019 and int(a[5:7])<=4:
    print("Heisei")
else:
    print("TBD")
# Judge status: Wrong Answer
N=int(input())
S=input()
ans=1
for i in range(N-1):
  ans=max(ans,len(list(set(list(S[:i+1])) & set(list(S[i+1:])))))
print(ans)
# Judge status: Accepted
print('red' if int(input())<3200 else input())
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

suma = sum(a)
sumb = sum(b)

if suma > sumb:
    print("No")
    exit()

sum_minus=0
sum_plus=0
for i in range(n):
    sub = a[i] - b[i]
    if sub < 0:
        sum_minus+=sub
    else:
        sum_plus+=sub

sm = sum_minus+sum_plus

if -sm < sum_plus:
    print("No")
else:
    print("Yes")
# Judge status: Wrong Answer
ret = 0
for x in range(11, int(input()) + 1, 2):
    n = 2
    for y in range(2, x // 2 + 1):
        if x % y == 0:
            n += 1
    if n == 8:
        ret += 1
        print(x)
print(ret)
# Judge status: Wrong Answer
x = int(input())
y = [3,5,7]
print("Yes" if x in y else "No")
# Judge status: Wrong Answer
N = int(input())
li = list(map(int,input().split()))
ans = 0
li.sort()
for i in range(3*N):
  if N <= i and i < 2*N:
    ans += li[i]
print(ans)
# Judge status: Accepted
A,B,N = map(int, input().split())
if B == 1 or A == 1:
  floor = 0
else:
  if N < B:
    floor = int(A*N/B) - A*int(N/B)
  elif N == B:
    floor = int(A*(N-1)/B) - A*int((N-1)/B)
  else:
    floor = max([(int(A*(x-1)/B) - A*int((x-1)/B)) for x in range(B,N,B)])
    
print(floor)
# Judge status: Accepted
N = int(input())
D = sorted(list(map(int, input().split())))

D1 = D[int(N / 2) -1]
D2 = D[int(N / 2)]

count = 0

for i in range(D1, D2, 1):
	count+=1

print(count)
# Judge status: Accepted
import math
A, B = map(int, input().split())
 
 
def prime_factorize(n):
    a = [1]
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    a.sort()
    return a
 
 
print(len(list(set(prime_factorize(math.gcd(A, B))))))
# Judge status: Accepted
s = str(input())
t = str(input())
slen = len(s)
if s[:] == t[:slen]:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
N, A, B = map(int, input().split())
print((N // (A+B)) * A + min(A, N % (A+B)))
# Judge status: Accepted
num = int(input())
height = input().split()

sum = 0
max_height_now = 0
for index in range(num):
  height_now = int(height[index])
  if height_now >= max_height_now:
    max_height_now = height_now
  else:
    sum += max_height_now - height_now

print(sum)
# Judge status: Accepted
N, *A = map(int, open(0).read().split())

ans = 0
cnt = 0
for i in range(N):
    if A[i] > 0:
        cnt += A[i]
    else:
        ans += cnt // 2
        cnt = 0
else:
    ans += cnt // 2

print(ans)
# Judge status: Accepted
n=int(input())
if n==0:
  print(0)
  exit()
if n==1:
  print(1)
  exit()
ans=[]
while n!=1:
  r=n%2
  ans.append(str(r))
  n=(n-r)//(-2)
ans.append(str(1))
ans.reverse()
print(''.join(ans))
# Judge status: Wrong Answer
a, b, c = map(int, input().split())

if a > b and a > c:
    print(a*10+b+c)
elif b > a and b > c:
    print(b*10+a+c)
else: print(c*10+a+b)
# Judge status: Accepted
n = int(input())
ans = sum(list(range(1,n+1)))
print(ans)
# Judge status: Accepted
import math
n = int(input().replace(' ',''))
M = math.ceil(math.sqrt(n))

for i in range(1,M+1):
    if i**2 == n:
        print('Yes')
        exit()

print('No')
# Judge status: Accepted
s = input()
for i in range(n := len(s)):
    for j in range(n-i):
        if s[:i]+s[i+j:] == "keyence":
            print('YES')
            exit()
else:
    print('NO')
# Judge status: Accepted
S = input()
print(S[:3]+"8"+S[4:])
# Judge status: Accepted
s = input()
h = s.replace('hi', '')
if h == '':
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
a, b, x = map(int, input().split())
c1 = a // x
c2 = b // x
if a == b:
  if a % x == 0:
    print(1)
  else:
    print(0)
  exit()
print(c2-c1+1)
# Judge status: Wrong Answer
s = list(input())

if len(s) %2 == 1:
  s.pop(-1)
else:
  s.pop(-1)
  s.pop(-1)

while len(s) != 0:
  l = len(s)
  if s[:l//2] == s[l//2:]:
    print(l)
  s.pop(-1)
  s.pop(-1)
# Judge status: Wrong Answer
N,M = [int(hoge) for hoge in input().split()]
Ball = [False]*N
BallNum = [1] * N
Ball[0] = True
for i in range(M):
    x,y = [int(hoge) - 1  for hoge in input().split()]
    BallNum[x] -= 1
    BallNum[y] += 1
    Ball[y] = Ball[x]
    if BallNum[x] == 0:
        Ball[x] = False
print(sum(Ball))
# Judge status: Accepted
N = int(input())

def cal(a,b,c):
    return(a**2+b**2+c**2 + a*b+b*c+c*a)

memo = [0]*(10**4)

for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            temp = cal(i,j,k)
            if temp <= 10**4:
                memo[temp-1] += 1
for i in memo[:N]:
    print(i)
# Judge status: Wrong Answer
import math

N = int(input())
X = 0
a = 0
for i in range(N):
  X = math.floor(1.08*i)
  if(X==N):
    print(i)
    a+=1
    break
if(a ==0):
  print(":(")
# Judge status: Wrong Answer
n = int(input())
A = list(map(int,input().split()))
ans = A[0]
for i in A[1:]:
    if i % ans == 0 or ans % i == 0:
        ans = min(ans,i)
    else:
        print(1)
        break
else:
    print(ans)
# Judge status: Wrong Answer
r,g,b = map(int,input().split())
number = g*10 + b
print("YES" if number%4==0 else "N0" )
# Judge status: Wrong Answer
N = int(input())
MOD = 10**9 + 7
def f(x, y): return pow(x, y, MOD)
print(f(10, N) - f(9, N) - f(9, N) + f(8, N))
# Judge status: Accepted
w = list(input())
s = set(w)
for i in s:
  if w.count(i)%2 != 0:
    print("No")
    break
else:
  print("Yes")