peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
A, B, K = map(int, input().split())

l = range(A, B+1)
a = [n for n in l[:K]]
b = [n for n in l[-K:]]

for n in sorted(set(a + b)):
    print(n)
# Judge status: Accepted
N = int(input())
S = [c for c in input()]

for idx, alphabet in enumerate(S):
  code = ord(alphabet) + N
  if code > ord('Z'):
    code = ord('A') + (code - ord('Z') - 1)
  
  S[idx] = chr(code)

print(''.join(S))
# Judge status: Wrong Answer
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

a,b,c = map(int,input().split())
max_block = a*b*c
max_edge = max(a,b,c)
min_edge = min(a,b,c)
middle_edge = (a+b+c) - max_edge - min_edge
choku1 = (max_edge//2)*min_edge*middle_edge
choku2 = (max_edge//2+1) * min_edge * middle_edge
print(abs(choku1-choku2))
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
N=int(input())
a = list(map(int, input().split()))
import fractions
ans = a[0]
for i in range(1, N):
  ans = ans * a[i] // fractions.gcd(ans, a[i])
x=0
for i in a:
  x+=(i//ans)%(10**9+7)
print(x)
# Judge status: Accepted
n,k = map(int,input().split())
p = list(map(int,input().split()))

wrk = sum(p[:k])
ans = wrk
for i in range(1,n-k+1):
    wrk-=p[i-1]
    wrk+=p[i+k-1]
    ans = max(ans,wrk)

print(0.5+(0.5*ans)+(k-1)*0.5)
# Judge status: Accepted
import math
from decimal import Decimal 
A,B = input().split()
C = Decimal(B)
print(math.floor(int(A)*C))
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
a.sort()
ans=0
del a[-n:]
for i in range(n):
  ans+=a[-1-i]
print(ans)
# Judge status: Accepted
A, B, X = map(int, input().split())
if X >= A and X <= A+B:
    print("YES")
else:
    print("NO")
# Judge status: Wrong Answer
def fu(n):
    if n<0:
        return (n*(-1))
    return n
a,b = map(int,input().split())
l = [fu(a-sum(range(1,i+1))) for i in range(1,1000)]
print(min(l))
# Judge status: Accepted
N = int(input())
A = [int(i) for i in input().split()]
ans = True
for a in A:
    if a % 2 == 0:
        if not(a % 3 == 0 or a % 5 == 0):
            ans = False
            break
print('APPROVED' if ans else 'DENIED')
# Judge status: Accepted
N, x = map(int, input().split())
a = list(map(int, input().split()))

a.sort()
if sum(a) == x:
    print(N)
else:
    i = 0
    candy = 0
    while candy <= x and i <= N - 1:
        candy += a[i]
        i += 1
    print(i - 1)
# Judge status: Accepted
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
MAP = lambda: map(int, INPUT().split())

sys.setrecursionlimit(10 ** 9)


def main():
    A, B, K = MAP()

    cnt = 0
    for i in range(A-1, -1, -1):
        if A%(i+1) == 0 and B%(i+1) == 0: cnt += 1
        if cnt == K:
            print(i+1)
            sys.exit()


if __name__ == '__main__':
    main()
# Judge status: Accepted
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

ans = 0
for i in range(N):
    if i+1 <= K:
        ans += X
    else:
        ans += Y
        
print(ans)
# Judge status: Wrong Answer
n = int(input())

if n % 2 == 0:
    print(n/2)
else:
    non_odd = (n-1)//2
    odd = non_odd + 1
    print(odd/n)
# Judge status: Wrong Answer
N,K = map(int,input().split())
h = [int(input()) for _ in range(N)]
h.sort()
ans = 1e10
for i in range(N-K+1):
    tmp = h[i:i+K]
    print(tmp)
    ans = min(ans,max(tmp)-min(tmp))


print(ans)
# Judge status: Accepted
from collections import Counter

alph = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
S = [input() for _ in range(n)]
cntS = [None] * n
for i in range(n):
    cntS[i] = Counter(S[i])

ans = []
for c in alph:
    ans += [c * min(cntS[i][c] for i in range(n))]

print(''.join(ans))
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
cnt1=0
cnt2=0
cnt4=0
for i in a:
  if i%2==1:
    cnt1+=1
  elif i%4!=0:
    cnt2+=1
  elif i%4==0:
    cnt4+=1
if cnt2==0:
  if cnt1<=cnt4+1:
    print('Yes')
  else:
    print('No')
else:
  if cnt1<=cnt4:
    print('Yes')
  else:
    print('No')
# Judge status: Accepted
def main():
    A, B, C, X, Y = list(map(int, input().split(' ')))
    p1 = A * X + B * Y
    p2 = 2 * C * X + B * max([0, Y - X])
    p3 = 2 * C * Y + A * max([0, X - Y])
    p4 = 2 * C * max([X, Y])
    print(min([p1, p2, p3, p4]))


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
n,m=map(int,input().split())
a=[int(ss) for ss in input().split()]
a=sorted(a,reverse=True)
r="Yes"
for ii in range(m):
  if a[ii]<1/(4*m):
    r="No"
    break
print(r)
# Judge status: Accepted
import sys

input = sys.stdin.readline

def main():
    ans = 0
    A, B, C = map(int, input().split())
    ma, mi = max(A,B,C), min(A,B,C)
    if ma*3%2 != (A+B+C)%2:
        ma += 1
    ans = (ma*3-(A+B+C))//2 + (ma*3-(A+B+C))%2
    print(ans)

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
x, y, z = map(int,input().split())
a =[x]
b =[y]
c =[z]
if a[0] == b[0] == c[0]:
    print('-1')
    exit()
for i in range(10):
    if a[i] % 2 == 0 and b[i] % 2 == 0 and c[i] % 2 == 0:
        a.append((b[i] + c[i]) // 2)
        b.append((a[i] + c[i]) // 2)
        c.append((b[i] + a[i]) // 2)
    
    else:
        print(i)
        exit()
# Judge status: Wrong Answer
import math
a, b, c = map(int, input().split())
root_ab = int(math.sqrt(a*10**10)) + int(math.sqrt(b*10**10))
root_c = int(math.sqrt(c*10**10))
if root_ab < root_c:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
import heapq

n, m = map(int, input().split())
ab = sorted([list(map(int, input().split())) for _ in range(n)], reverse=True)

c = []
ans = 0
for i in range(m):
    while len(ab) != 0 and ab[-1][0] <= i+1:
        _, b = ab.pop()
        heapq.heappush(c, -b)
    if c:
        ans += -heapq.heappop(c)
print(ans)
# Judge status: Accepted
a,b,c=map(int,input().split())

if b-a==c-b:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
a,b,c=sorted(map(int,input().split()))
print(c*10+b+a)
# Judge status: Accepted
N = int(input())
ans = 0
for n in range(0, N + 1):
    if n % 3 == 0 or n % 5 == 0:
        pass
    else:
        ans += n

print(ans)
# Judge status: Accepted
s = input()
if int(s[:2]) >= 1 and int(s[:2]) <= 12 and int(s[2:]) >= 1 and int(s[2:]) <= 12:
    print('AMBIGUOUS')
elif int(s[:2]) >= 1 and int(s[:2]) <= 12:
    print('MMYY')
elif int(s[2:]) >= 1 and int(s[2:]) <= 12:
    print('YYMM')
else:
    print('NA')
# Judge status: Accepted
S = input()
check = False
if S[0] == "A" and "C" in S[2:-1]:
  i = list(S).index("C")
  T = S[1:i] + S[i+1:]
  if T == T.lower():
    check = True
    
print("AC" if check else "WA")
# Judge status: Accepted
a,b = map(int, input().split())
if(1<=a<=9 and 1<=b<=9):
  print(a*b)
else:
  print(-1)
# Judge status: Accepted
import math
N, K = map(int, input().split())

ans = 0
for r in range(1, min(K, N+1)):
    x = math.ceil( math.log2(K/r))
    ans += pow(0.5, x) / N
    # print(x, pow(0.5, x) / N)
if K <= N:
    ans += (N - K + 1) / N
print(ans)
# Judge status: Accepted
n = int(input())
s = input()
list_intersection = []

for i in range(1, n + 1):
    a = set(s[:i])
    b = set(s[i:])
    intersection_a_b = a.intersection(b)
    list_intersection.append(len(intersection_a_b))

print(max(list_intersection))
# Judge status: Wrong Answer
N = int(input())
Sorted = [list(map(int, input().split())) for _ in range(N)]
Sorted.insert(0, [0, 0, 0])

for i in range(N):
  if abs(Sorted[i+1][1] - Sorted[i][1]) + abs(Sorted[i+1][2] - Sorted[i][2]) > Sorted[i+1][0] - Sorted[i][0]:
    print("No")
    break
  elif abs(Sorted[i+1][1] - Sorted[i][1]) == 0 and abs(Sorted[i+1][2] - Sorted[i][2]) == 0:
    print("No")
    break
else:
  print("Yes")
# Judge status: Accepted
x, y = map(int,input().split())
ans = 0
while x <= y:
    ans += 1
    x *= 2
print(ans)
# Judge status: Accepted
N=input()
V=list(map(int,input().split()))
V=sorted(V)


for i,v in enumerate(V):
  if i==0:
    ave=v
  else:
    ave=(ave+v)/2
    
print(ave)
# Judge status: Wrong Answer
S = input()
a = S.count('S')
b = S.count('T')
c = 0
for s in S:
  if s == 'T':
    c += 1
  else:
    break
d = 0
for s in S[::-1]:
  if s == 'S':
    d += 1
  else:
    break
c + d + abs(a-d - (b-c))
# Judge status: Accepted
g1 = [1,3,5,7,8,10,12]
g2 = [4,6,9,11]
g3 = [2]
x,y = map(int, input().split())
print('Yes' if (x in g1 and y in g1) or (x in g2 and y in g2) or (x in g3 and y in g3) else 'No')
# Judge status: Wrong Answer
from collections import defaultdict
n,k = map(int, input().split())
ans = 0
al = []
d = defaultdict(int)
for i in range(n):
  a,b = map(int, input().split())
  al.append(a)
  d[a] = b
  
al.sort()
for i in al:
  if k > d[i]:
    k -= d[i]
  else:
    print(i)
    break
# Judge status: Accepted

def resolve():
    def decode(x):
        return ord(x) - 97

    def encode(x):
        return chr(x + 97)

    S = list(map(decode, input()))
    K = int(input())

    for i in range(len(S) - 1):
        if S[i] == 0:
            continue
        if 26 - S[i] <= K:
            K -= 26 - S[i]
            S[i] = 0

    S[-1] = (S[-1] + K) % 26
    ans = map(encode, S)
    print("".join(ans))


if __name__ == "__main__":
    resolve()
# Judge status: Wrong Answer
if __name__ == "__main__":
    n, x, t = map(int, input().split())

    ans = t * (n + x - 1) / x
    ans = int(ans)
    print(ans)
# Judge status: Accepted
import sys
input = sys.stdin.readline

N = int(input())
S = set()

for _ in range(N):
    s = input().strip()
    S.add(s)

print(len(S))
# Judge status: Accepted
# C - Snuke Festival

import bisect

N = int(input())
A = list(int(x) for x in input().split())
B = list(int(x) for x in input().split())
C = list(int(x) for x in input().split())

B.sort()
C.sort()

BC = []
for i in range(N):
    BC.append((N - bisect.bisect_right(C, B[i])))

BC = BC[::-1]
BC2 = [0] * (N+1)
for i in range(N):
    BC2[i+1] = BC2[i] + BC[i]
BC2 = BC2[::-1]

ans = 0
for i in range(N):
    b = bisect.bisect_right(B, A[i])
    ans += BC2[b]

print(ans)
# Judge status: Wrong Answer
C=[[*map(int,input().split())] for _ in range(3)]

ans=0
for i in range(3):
    for j in range(3):
        tgt=C[i][j]
        found=False
        for ii in range(i+1):
            for jj in range(j+1):
                a=C[ii][j]
                b=C[i][jj]
                if a+b==tgt:
                    ans+=1
                    break

print('Yes' if ans>=6 else 'No')
# Judge status: Wrong Answer
n = int(input())

if n//2 == 0:
    t=(n//2)/n
else:
    t=(n//2+1)/n

print('{:.10f}'.format(t))
# Judge status: Accepted
n = int(input())
if n < 1000:
  print("ABC")
else:
  print("ABD")
# Judge status: Accepted
import collections
w = list(input())
wc = collections.Counter(w)
num = 0
for i, x in enumerate(wc):
  if(wc[x]%2==0):
    num += 1
if(num==len(wc)):
  print('Yes')
else:
  print('No')
# Judge status: Accepted
N = int(input())
string = ""
while N > 0:
    N, remainder = divmod(N - 1, 26)
    string = chr(97 + remainder) + string
print(string)
# Judge status: Wrong Answer
A, B, C = map(int, input().split())
K = int(input())
Ak = 0

for i in range(K):
    if A > B:
        B = B * 2
        Ak = i

    else:
        break

if K - Ak > 0:
    for j in range(K - Ak):
        if B > C:
            C = C * 2
else:
    print("No")
    exit()

if A < B and B < C:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
#!/usr/bin/env python3
from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right
from itertools import accumulate

def main():
    N = int(input())
    T = input()
    S = []
    for s in T:
        if s == '(':
            S.append(1)
        else:
            S.append(-1)
    S = list(accumulate(S))
    # print(S)
    minS = min(S)
    for i in range(N):
        S[i] -= minS
    print('('*(-minS) + T + ')'*S[-1])
    

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
x,y,z=map(int,input().split())
print(x//(y+z))
# Judge status: Accepted
s = [input() for i in range(5)]
x10 = int(0)
sum = int(0)
a = []

for i in range(5):
  if int(s[i]) % 10 == 0:
    x10 = x10 + 1
  else:
    a.append(int(s[i]) % 10)
  sum = sum + ((int(s[i]) - 1) // 10 + 1) * 10

  
b = [int(s) for s in a]

if x10 == 5:
  print(sum)
else:
  print(sum - 10 + min(b))
# Judge status: Accepted
k, a, b = map(int, input().split())
bis = 1
if b - a <= 2:
    bis += k
else:
    while k != 0:
        if bis >= a and k >= 2:
            bis += b - a
            k -= 2
        else:
            bis += 1
            k -= 1
print(bis)
# Judge status: Accepted
import math
N = int(input())

keta = int(math.log10(N)+1)
count = 0
for i in range(1,keta+1):
    if i % 2 == 1:
        if i == 1:
            if keta == 1:
                count += N
            else:
                count += 9
        elif i != keta:
            count += int('8'+'9'*(i-1)) + 1
        else:
            count += N - 10 ** (keta-1) + 1
print(count)
# Judge status: Accepted
x = int(input())
div,mod = divmod(x,11)

ans = div*2

if mod>6:
  ans +=2
elif mod>0:
  ans +=1

print(ans)
# Judge status: Accepted
n=int(input()); b=''
while n: b=str(n%2)+b; n=-(n//2)
print(b if b else 0)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
seta = set(a)
if len(a)==len(seta):
  print("YES")
else:
  print("NO")
# Judge status: Accepted
from fractions import gcd
from math import ceil
n,m=map(int,input().split())
a=list(map(int,input().split()))
c=len(bin(a[0]))-bin(a[0]).rfind("1")
for i in range(1,n):
  if c!=len(bin(a[i]))-bin(a[i]).rfind("1"):
    print(0)
    exit()
g=a[0]
for i in range(n-1):
   g=(g//gcd(g,a[i+1]))*(a[i+1]//gcd(g,a[i+1]))*gcd(g,a[i+1])
g//=2
print(ceil((m//g)/2))
# Judge status: Accepted
x, a, b = (int(x) for x in input().split())
if abs(a-x) < abs(b-x):
    print("A")
else:
    print("B")
# Judge status: Accepted
N = input()
AL = list(map(int,input().split()))

Amax = 0
FD = 0

for Ai in AL:
#  print('FD=%d' % FD)
  if Amax > Ai:
#    print('1')
    FD = FD + (Amax - Ai)
  elif Amax < Ai:
#    print('2')
    Amax = Ai

print(FD)
# Judge status: Accepted
n=int(input())
ans=0
for i in range(2,1000010):
	power=0
	j=1
	if(n%i==0):
		while(n%i==0):
			power+=1
			n=(n//i)
		while(power>=j):
			power-=j
			j+=1
			ans+=1
if(n>1):
	ans+=1
print(ans)
# Judge status: Wrong Answer
a,b=map(int,input().split())
a=(a%13+11)%13
b=(b%13+11)%13
if a<b:
    print("Alice")
elif a==b:
    print("Draw")
else:
    print("Bob")
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

A.sort(reverse=True)

res = 0

res += A.pop(0)

count = 1

for i in range(N):
    for _ in range(2):
        if count < N - 1:
            res += A[i]
            count += 1

print(res)
# Judge status: Accepted
a,b,c=map(int,input().split())
d,e,f=map(int,input().split())
g,h,i=map(int,input().split())
lst=[a,b,c,d,e,f,g,h,i]
for i in range(int(input())):
  x=int(input())
  for j in range(9):
    if x==lst[j]:
      lst[j]=0
a,b,c,d,e,f,g,h,i=lst
tf=0
for k in [a+b+c,d+e+f,g+h+i,a+d+g,b+e+h,c+f+i,a+e+i,c+e+g]:
  if not k:
    tf=1
    break
if tf:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
n = int(input())
abc = [list(map(int, input().split())) for _ in range(n)]

dp=[[0]*3 for _ in range(n+1)]


for i in range(0,n):
  for j in range(0,3):
    for k in range(0,3):
      if j!=i:
        dp[i+1][k]=max(dp[i+1][k],dp[i][j]+abc[i][j])
res=0
for j in range(0,3):
  res=max(res,dp[n][j])
print(res)
# Judge status: Wrong Answer
import numpy as np
n = int(input())
x = []
for _ in range(n):
    x.extend(sorted([ord(i) - 97 for i in input()]))
x = np.array(x).reshape(n,10)
count = 0
for i in x:
    count += (len(np.where(x == i)[0])/10) - 1
print(int(count/2))
# Judge status: Wrong Answer
K=int(input())
import queue
a=queue.Queue()
if K<=9:
  print(K)
else:
  for i in range(1,10):
    a.put(i)
  n=K
  while n>1:
    x=a.get()
    if x%10!=0:
      a.put(10*x-1)
    a.put(10*x)
    if x%10!=9:
      a.put(10*x+1)
    n-=1
  ans=a.get()
  print(ans)
# Judge status: Wrong Answer
s=list(input())
x=0
if len(s)<=3:
    x=0
    print(x)
else :
    for j in range(len(s)):
        count=0
        for i in range(len(s)-j):
            a="".join(s[j:j+count+1])
            if int(a) % 2019 ==0:
                x+=1
                count+=1
            else:
                count+=1
print(x)
# Judge status: Accepted
N = int(input())
ans = (10**N - 2*9**N + 8**N) % (10**9 +7)
print(ans)
# Judge status: Wrong Answer
import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    l = [i*i for i in range(1,1100)]
    x = I()
    i = 0
    while l[i] <= x:
        i += 1
    print(l[i-1])
# Judge status: Wrong Answer
N, X = map(int, input().split())
L = list(map(int, input().split()))

cnt = 1
D_a = 0
D_b = 0
for i in range(N):
    D_a = D_b + L[i]
    D_b = D_a
    if D_a > X:
        print(cnt)
    else:
        cnt += 1
# Judge status: Accepted
K = int(input())
S = input()

S_len = len(S)

if len(S)<=K:
    print(S)
else:
    print(S[0:K]+'...')
# Judge status: Accepted
a,b,c=[int(i)for i in input().split()]
x=max(a,b,c)
print(9*x+a+b+c)
# Judge status: Accepted
def main():
    N = int(input())

    ans = (N + 1) // 2
    ans /= N
    print(ans)


if __name__ == '__main__':
    main()

# import sys
# input = sys.stdin.readline
# 
# sys.setrecursionlimit(10 ** 7)
# 
# (int(x)-1 for x in input().split())
# rstrip()
#
# def binary_search(*, ok, ng, func):
#     while abs(ok - ng) > 1:
#         mid = (ok + ng) // 2
#         if func(mid):
#             ok = mid
#         else:
#             ng = mid
#     return ok
# Judge status: Wrong Answer
S=input()

if S == 'SUN':
    print(7)
elif S == 'MON':
    print(6)
elif S == 'TUE':
    print(5)
elif S == 'WED':
    print(4)
elif S == 'THS':
    print(3)
elif S == 'FRI':
    print(2)
elif S == 'SAT':
    print(1)
# Judge status: Wrong Answer
import numpy as np

temp = input().split()

s = [input().split() for i in range(int(temp[0]))]

cnt = 0

for i in range(int(temp[0])):
  if np.sqrt(int(s[i][0])*int(s[i][0]) + int(s[i][1])*int(s[i][1])) > int(temp[1]):
    cnt += 1

print(cnt)
# Judge status: Wrong Answer
A, B = input().split()

A = int(A)
B = float(B)

B *= 100

ans = A * B / 100

print(int(ans))
# Judge status: Wrong Answer
k, n = map(int, input().split())
#print(k)
#print(n)
a = input().split()
l_si_i = [int(s) for s in a]
#print(l_si_i)

for i in reversed(range(0, n)):
  if l_si_i[i] == 0:
    l_si_i.pop(i)

#print(l_si_i)

minIndex = l_si_i.index(min(l_si_i))

#print(minIndex)

if minIndex != 0:
  temp = l_si_i.pop(minIndex)
  l_si_i.insert(0, temp)

#print(l_si_i)

sub = 0
l = len(l_si_i)
for i in range(l):
  if i != 0:
    sub += l_si_i[i] - l_si_i[i-1]

print(sub)
# Judge status: Wrong Answer
n=int(input())
x=[]
for _ in range(n):
    a,b=map(int,input().split())
    x.append([a,b,b-a])

x.sort(key=lambda x:x[2])
t=0
ans='Yes'
for i in range(n):
    if t<=x[i][2]:
        t+=x[i][0]
    else:
        ans='No'
        break
print(ans)
# Judge status: Wrong Answer
N,K = map(int,input().split())
R,S,P = map(int,input().split())
score_dic = {"r":R,"s":S,"p":P}
win_dic = {"r":"p","s":"r","p":"s"}
T = list(input())
score = 0
for i in range(0,N,1):
    if i >= K and T[i-K] == T[i]:
        T[i]="m"
        print(0)
    else:
        score+=score_dic[win_dic[T[i]]]
        print(score_dic[T[i]])

print(score)
# Judge status: Accepted
import fractions
a,b,c,d = map(int,input().split())
lcm = c * d // fractions.gcd(c, d)
x = b//c - (a-1)//c
y = b//d - (a-1)//d
warikireru = x+y - (b//lcm - (a-1)//lcm)
print(b-a+1-warikireru)
# Judge status: Wrong Answer
a=int(input())
ans=a+a**2+a**3
print("ans")
# Judge status: Accepted
l = list(map(int,input().split()))
l.sort()
a = l[0]
b = l[1]
c = l[2]
if a%2 == 0 or b%2 == 0 or c%2 == 0:
    print(0)
    exit(0)
vmax,vmin = 0,0
v = a*b*c
vmin = (c//2)*a*b
vmax = v - vmin
print(vmax-vmin)
# Judge status: Accepted
def main():
  n, mods = 0, [1]+[0]*2019
  for i, j in enumerate(reversed(input())):
    n = (n+int(j)*pow(10, i, 2019))%2019
    mods[n] += 1
  print(sum([i*(i-1)//2 for i in mods]))
main()
# Judge status: Wrong Answer
n = int(input())
X = sorted(list(map(int,input().split())), reverse=True)
Y = sorted(list(map(int,input().split())), reverse=True)
Z = sorted(list(map(int,input().split())), reverse=True)
print(sum((n-bisect.bisect_right(X,b)) * (bisect.bisect_left(Z,b))) for b in Y)
# Judge status: Accepted

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

# 最大公約数(greatest_common_divisor)
def gcd(a, b):
  if b == 0:
    return a
  return gcd(b, a%b)

# 最小公倍数(lowest_common_multiple)
def lcm(a, b):
  return a*b//gcd(a,b)

# 最小公倍数と、比べていない数字を比べ、最小公倍数を更新する
alcm = t[0]
for i in t[1:]:
  alcm = lcm(alcm, i)

print(alcm)
# Judge status: Accepted
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
#N, K = map(int, input().split())
# 文字列の入力
s = input()
#開業されたN個要素を受け付ける
#input_list = [list(map(int, input().split())) for i in range(N)]

print(s[0:3])
# Judge status: Wrong Answer
a = int(input())
arr = list(range(400,1801,200))
arr2 = [8,7,6,5,4,3,2,1]
res = 8
for i in range(1,len(arr)):
  if (a >= arr[i]):
    res = arr2[i]
  else:
    print(res)
    break
# Judge status: Accepted
a="".join(["1" if s in ["A","C","G","T"] else "0" for s in input()])
ans=[len(s) for s in a.split("0")]
print(max(ans))
# Judge status: Accepted
a,b,k = list(map(int, input().split()))

if a+b <= k:
    print('0 0')
else:
    t = a-k if a-k > 0 else 0 
    ao = b-(k-a) if t == 0 else b
    print('{} {}'.format(t, ao))
# Judge status: Accepted
a,b = map(int,input().split())
x = str(a)+str(b)
y = int(x)**0.5
if y.is_integer():
  print('Yes')
else:
  print('No')
# Judge status: Accepted
n,k=map(int,input().split())
p=list(map(int,input().split()))
s=0
p.sort()
for i in range(k):
    s+=p[i]

print(s)
# Judge status: Accepted
#!/usr/bin/env python
# coding: utf-8

def ri():
    return int(input())

def rl():
    return list(input().split())

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

def main():
    s = input()
    if s == "RRR":
        print(3)
    elif "RR" in s:
        print(2)
    elif "R" in s:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()
# Judge status: Accepted
import sys
read=sys.stdin.buffer.readline

N,X=map(int,read().split())
L=list(map(int,read().split()))

ans=1
res=0
for l in L:
    res+=l
    if res<=X:
        ans+=1
    else:
        break
print(ans)
# Judge status: Wrong Answer
from collections import deque
n,m = map(int,input().split())

path = []
net = [[] for _ in range(n+1)]
for _ in range(m):
    a,b = map(int,input().split())

    net[a].append(b)
    net[b].append(a)

a = [-1] * (n+1)
d = deque()
d.append(1)
while d:
    u = d.popleft()
    for child in net[u]:
        if a[child] != -1:continue
        a[child] = u
        d.append(child)
a = a[1:]
for z in a:
    if z == -1:
        print("No")
        exit()
print("Yes")
for z in a:
    print(z)
# Judge status: Accepted
L = [int(input()) for i in range(5)]
k = int(input())
if L[4]-L[0] > k:
  print(":(")
else:
  print("Yay!")
# Judge status: Accepted
#!/usr/bin/env python3

def main():
    N, M = map(int, input().split())
    L =[0 for i in range(M)]
    R = [0 for i in range(M)]

    for i in range(0, M):
        L[i], R[i] = map(int, input().split())
    
    print(max(min(R) - max(L) + 1, 0))


main()
# Judge status: Wrong Answer
n,k,s = map(int, input().split())
res = [s]*k
if s > 10:
  for i in range(n - k):
    res.append(0)
  print(*res)
else:
  for i in range(n - k):
    res.append(100)
  print(*res)
# Judge status: Wrong Answer
n,m=map(int,input().split())

print((n//2)+(m//2))
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
print(a[n//2]-a[n//2-1])