Harryxun/stf_run huggingface dataset:
l, r = map(int, input().split())
if r - l >= 2018:
    print(0)
else:
    min_ij = 2018 ** 2
    for i in range(l, r):
        for j in range(i + 1, r + 1):
            min_ij = min(min_ij, (i % 2019) * (j % 2019))

print(min_ij)

### FIXED CODE ###

l, r = map(int, input().split())
if r - l >= 2018:
    print(0)
else:
    min_ij = 2018
    for i in range(l, r):
        for j in range(i + 1, r + 1):
            min_ij = min(min_ij, ((i % 2019) * (j % 2019)) % 2019)
    print(min_ij)
A = list(map(int, input().split()))
A.append(sum(A))

ans = False
for i in A:
  if A%3 == 0:
    ans = True
if ans:
  print("Possible")
else:
  print("Impossible")

### FIXED CODE ###

A = list(map(int, input().split()))
A.append(sum(A))

ans = False
for i in A:
  if i%3 == 0:
    ans = True
if ans:
  print("Possible")
else:
  print("Impossible")
N, M = map(int, input().split())
A = list(map(int, input().split()))
flag = True
 
for i in  A:
  N = N - i
  if N < 0:
    flag = False
    break
 
if flag == True:
print(N)
else:
print(-1)

### FIXED CODE ###

N, M = map(int, input().split())
A = list(map(int, input().split()))
flag = True
 
for i in  A:
  N = N - i
  if N < 0:
    flag = False
    break
 
if flag == True:
  print(N)
else:
  print(-1)
n,k = map(int,input().split())
a = list(map(int,input().split()))
ans = 0
if a[0] != 1:
  a[0] = 1
  ans += 1
b = [[]for i in range(n)]
for i in range(n):
  b[a[i]-1].append(i)
b[0].remove(0)
kyo = [float("inf")] * n
def dfs(x,y,z):
  if y>k and z == 0:
    y= 0
    z = 1
  if y > k-1 and z == 1:
    y = 0
  kyo[x] = y
  for i in b[x]:
    dfs(i,y+1,z)
dfs(0,0,0)
print(kyo.count(0)-1+ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(200000)
n,k = map(int,input().split())
a = list(map(int,input().split()))
ans = 0
if a[0] != 1:
  a[0] = 1
  ans += 1
b = [[]for i in range(n)]
for i in range(1,n):
  b[a[i]-1].append(i)
huka = 0
kyo = [float("inf")] * n
z =[[]for i in range(n)]
def dfs(x,y):
  kyo[x] = y
  z[y].append(x)
  for i in b[x]:
    dfs(i,y+1)
dfs(0,0)
def dfs2(x,y):
  if kyo[x] <=k-y:
    return
  if y == k-1 and x != 0:
    kyo[x] = 0
    global ans
    ans += 1
    return
  kyo[x] = 0
  dfs2(a[x]-1,y+1)
for i in range(n-1,k,-1):
  for j in z[i]:
    dfs2(j,0)
print(ans)
def solve():
  N = input()
  
  print ('ABC') + N

if __name__ == '__main__':
    solve()


### FIXED CODE ###

N = int(input())
print ('ABC%d' %N)
print(a=list(input())
b=0
for i in range(3):
	if a[i]=='1':
		b=b+1
print(b)

### FIXED CODE ###

a=list(input())
b=0
if a[0]=='1':
	b=b+1
if a[1]=='1':
	b=b+1
if a[2]=='1':
	b=b+1
print(b)
N = int(input())
xpy_max = 0
xpy_min = 10 ** 9 + 3
xmy_max = 0
xmy_min = 10 ** 9 + 3
for i in range(N):
    x, y = map(int, input().split())
    if x + y <= xpy_min:
        xpy_min = x + y
        a = (x, y)
    if x + y >= xpy_max:
        xpy_max = x + y
        b = (x, y)
    if x - y >= xmy_max:
        xmy_max = x - y
        c = (x, y)
    if x - y <= xmy_min:
        xmy_min = x - y
        d = (x, y)
ans = max(b[0] - a[0] + b[1] - a[1], c[0] - d[0] + c[1] - d[1])
print(ans)








### FIXED CODE ###

N = int(input())
a = - (10 ** 9 + 3)  # max(x + y)
b = 10 ** 9 + 3  # min(x + y)
c = - (10 ** 9 + 3)  # max(x - y)
d = 10 ** 9 + 3  # min(x - y)
for i in range(N):
    x, y = map(int, input().split())
    a = max(a, x + y)
    b = min(b, x + y)
    c = max(c, x - y)
    d = min(d, x - y)
ans = max([a - b, c - d])
print(ans)
import numpy  as np

N = int(input())

# log_6 10^5 < 7
# log_9 10^5 < 6
# 15 = 1 + 6 + 5
memo = np.zeros((15, N + 1))
memo[:, :] = N * 2
memo[0][0] = 0

values = []

i = 1
while i <= N:
    values.append(i)
    i *= 6
i = 9
while i <= N:
    values.append(i)
    i *= 9

for i in range(len(values)):
    v = values[i]
    for w in range(N+1):
        if v > w:
            memo[i + 1][w] = memo[i][w]
        else:
            memo[i + 1][w] = min(memo[i][w], memo[i+1][w - v] + 1)
print(int(memo[len(values)][N]))

### FIXED CODE ###

import numpy  as np

N = int(input())

# log_6 10^5 < 7
# log_9 10^5 < 6
# 15 = 1 + 6 + 5
memo = np.zeros((15, N + 1),int)
memo[:, :] = N * 2
memo = memo.tolist()
memo[0][0] = 0

values = []

i = 1
while i <= N:
    values.append(i)
    i *= 6
i = 9
while i <= N:
    values.append(i)
    i *= 9

for i in range(len(values)):
    v = values[i]
    for w in range(N+1):
        if v > w:
            memo[i + 1][w] = memo[i][w]
        else:
            memo[i + 1][w] = min(memo[i][w], memo[i+1][w - v] + 1)
print(int(memo[len(values)][N]))
n,m=map(int,input().split())
h=list(map(int,input().split()))
ans=[1]*n
for _ in range(m):
  a,b=map(int,input().split())
  if ans[a-1]:
    if h[a-1]<=h[b-1]:
      ans[a-1]=0
  if ans[b-1]:
    if h[b-1]<=h[a-1]:
      ans[b-1]=0
print(ans.count(1))

### FIXED CODE ###

s = input()
if "ABC" == s:
    print("ARC")
else:
    print("ABC")
S = input()

ans_str = "keyence"

if S[0:7] == ans_str:
    print("YES")
    exit()

if S[len(S)-7:len(S)] == ans_str:
    print("YES")
    exit()

count_check_str = 0
count_insert = 0
count_ans_str = 0
for i in range(len(S)):
    if S[i] == ans_str[count_ans_str]:
        count_check_str += 1
        count_ans_str += 1
        if count_insert == 1:
            count_insert = 2
    else:
        if count_insert == 2:
            print("NO")
            exit()
        count_insert = 1

if count_check_str < 6:
    print("NO")
    exit()
print("YES")

### FIXED CODE ###

S = input()

for i in range(8):
    if S[0:i] + S[i+(len(S)-7):len(S)] == "keyence":
        print("YES")
        exit()
print("NO")
import numpy as np
N, W = map(int, input().split())

dp=np.zeros((N+1, W+1), dtype=np.int64)

for i in range(1,N+1):
    w, v =list(map(int, input().split()))
     dp[i]=dp[i-1]
     dp[i][w:]=np.maximum(dp[i-1][:W-w+1]+v, dp[i-1][w:])
print(np.max(dp))

### FIXED CODE ###

N, W = map(int, input().split())
weight, value = [0]*N, [0]*N
for i in range(N):
	weight[i], value[i] = map(int, input().split())


dp=[[0]*(W+1) for _ in range(N+1)]
#初期条件
#dp[0]=0
for i in range(N):
	for w in range(W+1):
		if w>=weight[i]:
			dp[i+1][w] = max(dp[i][w-weight[i]]+value[i], dp[i][w])
		else:
			dp[i+1][w]=dp[i][w]
print(dp[-1][-1])


"""
def solveDP(N, W, value, weight):
    dp = np.zeros((N+1, W+1))
    
    for i in range(N):
        for w in range(W+1):
            if w >= weight[i]:
                dp[i + 1, w] = max(dp[i, w - weight[i]] + value[i], dp[i, w])
            else:
                dp[i + 1, w] = dp[i, w]
    
    return dp[N , W]




import numpy as np
N,W = map(int,input().split())
 
dp=np.zeros(W-1, dtype=np.int64)
for _ in range(N):
	w, v = map(int, input().split())



for _ in range(N):
    w,v = map(int,input().split())
    np.maximum(dp[w:], dp[:-w] + v, out = dp[w:])
 
answer = dp.max()
print(answer)
"""
import math
r=int(input())
a=r*r*math.pi
b=2*r*math.pi
print('%.6f'%(a), end='')
print(' %.6f'%(b))

### FIXED CODE ###

import math
r=float(input())
a=r*r*math.pi
b=2*r*math.pi
print(a,b)
import sys
from collections import Counter

#[(105, 3), (120, 1), (106, 1), (119, 1)]
def selection(l1, l2, x ,y):
    
    #print('{}, {}'.format(x, y))
    
    #x yがlengthを超えたとき
    if x >= len(l1) or y >= len(l2):
        return x - 1, y - 1
    
    #それぞれの出現値が同じ場合
    if l1[x][0] == l2[y][0]:
            
        #出現回数が同じとき
        if l1[x][1] == l2[y][1]:
            return selection(l1, l2, x + 1 , y + 1)
    
    #出現回数を比較
    if l1[x][1] > l2[y][1]:
        return x , y - 1
        
    if l1[x][1] < l2[y][1]:
        return x - 1  , y
    
    return x, y

def main():
    input = sys.stdin.readline
    
    n = int(input())
    if n == 0 : return 0
    
    m = [int(i) for i in input().split()]
    
    even = [m[i] for i, _ in enumerate(m) if i % 2 == 0]
    odd = [m[i] for i, _ in enumerate(m) if i % 2 == 1]
    
    even_c = Counter(even).most_common()
    odd_c = Counter(odd).most_common()
    
    #print(even_c)
    #print(odd_c)
    
    e, o = selection(even_c, odd_c, 0 ,0)
    
    e = 0 if e < 0 else e
    o = 0 if o < 0 else o
    
    #print('{}, {}'.format(e, o))
    
    #全部ばらばら
    if (even_c[e][1] + odd_c[o][1] == 2):
        
        #0にならない
        ans = len(m) - 2
        ans = 1 if ans == 0 else ans
        print(ans)
        return
    
    #全部一緒
    if even_c[e][1] == odd_c[o][1] and even_c[e][0] == odd_c[o][0]:
        print(len(m) - even_c[e][1])
        return
    
    print( len(m) - (even_c[e][1] + odd_c[o][1]) )
    
    
if __name__ == '__main__':
    main()
    

### FIXED CODE ###

import sys
from collections import Counter
 
def main():
    input = sys.stdin.readline
    
    n = int(input())
    m = [int(i) for i in input().split()]
    
    #偶数列 奇数列
    even = [m[i] for i, _ in enumerate(m) if i % 2 == 0]
    odd = [m[i] for i, _ in enumerate(m) if i % 2 == 1]
    
    #頻値を取り出す
    even_c = Counter(even).most_common()
    odd_c = Counter(odd).most_common()
    
    ans = -1
    
    #print(even_c)
    #print(odd_c)
    #print(len(even_c))
    
    #最頻値の比較
    if even_c[0][0] != odd_c[0][0]:
        ans = len(m) - (even_c[0][1] + odd_c[0][1])
    
    #偶数列と奇数列の最頻値の数字が同じかつ、全て同じ数字じゃない
    elif even_c[0][0] == odd_c[0][0] and len(even_c) > 1:
        ans1 = len(m) - (even_c[0][1] + odd_c[1][1])
        ans2 = len(m) - (even_c[1][1] + odd_c[0][1])
        ans = ans1 if ans1 <= ans2 else ans2
    
    #全て同じ
    else:
        ans = even_c[0][1]
        
    #出力
    print(ans)
    
if __name__ == '__main__':
    main()
temp=int(input())
if temp >= 30 :
    answer = Yes
else:
    answer = No
print(answer)

### FIXED CODE ###

temp=int(input())
if temp >= 30 :
    answer = "Yes"
else:
    answer = "No"
print(answer)
N, M = map(int, input().split())

print(max(N -sum(list(map(int, input().split()))), -1))

### FIXED CODE ###

print(int(input())*2*3.14)
from collections import deque
N=int(input())
uvw=list(list(map(int,input().split())) for _ in range(N-1))

graph_list=[[] for _ in range(N)]
for u,v,w in uvw:
    graph_list[u - 1].append([v,w])
    graph_list[v - 1].append([u,w])

colors=[2]*N
nonvisited=[p for p in range(1,N+1)]
queue=deque([1])
colors[0]=0
while len(queue)>0:
    x=queue.popleft()
    if x!=0:
        nonvisited.pop(nonvisited.index(x))
    if len(nonvisited)==0:
        break
    for j in graph_list[x-1]:
        if j[0] in nonvisited:
            queue.append(j[0])
            colors[j[0]-1]=(colors[x]+j[1])%2
for p in colors:
    print(p)


### FIXED CODE ###

from collections import deque
N=int(input())
uvw=list(list(map(int,input().split())) for _ in range(N-1))

graph_list=[[] for _ in range(N)]
for u,v,w in uvw:
    graph_list[u - 1].append([v,w])
    graph_list[v - 1].append([u,w])

colors=[-1]*N
colors[0]=0
queue=deque([1])

while len(queue)>0:
    x=queue.popleft()
    if all(colors[i]!=-1 for i in range(N)):
        break
    for j in graph_list[x-1]:
        if colors[j[0]-1]==-1:
            queue.append(j[0])
            colors[j[0]-1]=(2+colors[x-1]+j[1])%2
for p in colors:
    print(p)
#include<algorithm>
using namespace std;

long long combination[100001];
long long numbers[100001];
#define MOD 1000000007

long long gcdExtended(long long,long long,long long*,long long*);

// Function to find modulo inverse of a 
long long modInverse(int a, int m) 
{ 
    long long x, y; 
    long long g = gcdExtended(a, m, &x, &y); \
    // m is added to handle negative x 
    long long res = (x%m + m) % m; 
    return res;
} 
  
// C function for extended Euclidean Algorithm 
long long gcdExtended(long long a, long long b, long long *x, long long *y) 
{ 
    // Base Case 
    if (a == 0) 
    { 
        *x = 0, *y = 1; 
        return b; 
    } 
  
    long long x1, y1; // To store results of recursive call 
    long long gcd = gcdExtended(b%a, a, &x1, &y1); 
  
    // Update x and y using results of recursive 
    // call 
    *x = y1 - (b/a) * x1; 
    *y = x1; 
  
    return gcd; 
} 

int main()
{
    int N,K;
    scanf("%d %d",&N,&K);
    for(int i = 0; i < N; i++)
    {
        scanf("%lld",numbers + i);
    }
    sort(numbers,numbers + N);

    for(int i = 0; i < N; i ++)
    {
        if(i < K - 1)
        {
            combination[i] = 0;
        }
        else if(i == K - 1)
        {
            combination[i] = 1;
        }
        else
        {
            combination[i] =((combination[i-1] * i) % MOD * modInverse(i - K + 1, MOD) % MOD);
        }
    }

    long long ans = 0;
    for(int i = 0; i < N; i ++)
    {
        ans += numbers[i] * combination[i];
        ans -= numbers[i] * combination[N-1-i];
        ans %= MOD;
        ans += MOD;
        ans %= MOD;
    }
    printf("%lld",ans % MOD);
}

### FIXED CODE ###

# modular inverse for positive a and b and nCk mod MOD depending on modinv

def egcd(a, b):
    if a == 0:
        return (b, 0, 1)
    else:
        g, y, x = egcd(b % a, a)
        return (g, x - (b // a) * y, y)

def modinv(a, m):
    g, x, y = egcd(a, m)
    if g != 1:
        raise Exception('modular inverse does not exist')
    else:
        return x % m

MOD = 10 ** 9 + 7

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

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

Combination = []

for i in range(N):
    if i < K - 1:
        Combination.append(0)
    elif i == K - 1:
        Combination.append(1)
    else:
        Combination.append(Combination[-1] * i * modinv(i - K + 1, MOD) % MOD)

        
ans = 0

for i in range(N):
    ans += a[i] * Combination[i]
    ans -= a[i] * Combination[N - i - 1]
    ans %= MOD

print(ans)
a, b, c = mapt(int, raw_input().split())
if a < b and b < c:
    print "Yes"
else:
    print "No"

### FIXED CODE ###

a, b, c = map(int, raw_input().split())
if a < b and b < c:
    print "Yes"
else:
    print "No"
import numpy as np

n,m = map(int, input().split())
p = np.array(list(map(int, input().split())))
p = p-1
q = np.zeros((m,2), dtype='uint32')
for i in range(m):
	q[i] = list(map(int, input().split()))
q=q-1
print(p)
print(q)
par = np.arange(n)
print(par)

def root(x):
	if par[x] == x:
		return x
	else:
		return root(par[x])
def merge(x, y):
	x = root(x)
	y = root(y)
	if x != y:
		par[x] = y
	pass

for x,y in q:
	merge(x,y)

tree = dict()
tree2 = dict()

for i in range(n):
	tree.setdefault(root(i), set())
	tree2.setdefault(root(i), set())
	tree[root(i)].add(i) 
	tree2[root(i)].add(p[i])

print(par)

ans = set()

for value in tree.items():
	print(value)

for item in tree2.items():
	print(item)


for value, value2 in zip(tree.values(), tree2.values()):
	ans = ans | value & value2

print(len(ans))

### FIXED CODE ###

n,m = map(int, input().split())
p = list(map(int, input().split()))
par = [i for i in range(n)]
rank = [0 for x in range(n)]

def root(x):
	tmp = par[x]
	if tmp == x:
		return x
	else:
		a = root(tmp)
		par[x] = a
		return a

def merge(x, y):
	x = root(x)
	y = root(y)
	if x == y:
		return
	else:
		if rank[x] > rank[y]:
			par[y] = x
			rank[y] += rank[x]
		else:
			par[x] = y
			rank[x] += rank[y]
		return

for i in range(m):
	x, y = map(int, input().split())
	merge(x-1, y-1)

ans = 0

for i in range(n):
	if p[i]-1 == i:
		ans += 1
	elif root(p[i]-1) == root(i):
		ans += 1

print(ans)
import sys
s=input()
t=input()

def c(a,b,s,t):
    li=""
    j=0
    for i in s:
        if i==a:
            li+=b
            if t[j]!=b:
                print("No")
                sys.exit()
        elif i==b:
            li+=a
        else:
            li+=i
        j+=1
    return li
    

for i in range(len(t)):
    if s[i]!=t[i]:
        l.append(t[i])
        s=c(s[i],t[i],s,t)
    
        

if s==t:
    print("Yes")
else:
    print("No")
        
    

### FIXED CODE ###

s=input()
t=input()


def f(s):
    l=[]
    a="abcdefghijklmnopqrstuvwxyz"
    r=""
    for i in range(len(s)):
        if s[i] in l:
            for j in range(len(l)):
                if s[i]==l[j]:
                    r+=a[j]
        else:
            r+=a[len(l)]
            l.append(s[i])
    return r

if f(s)==f(t):
    print("Yes")
else:
    print("No")
lst = [[int(i) for i in input().split()] for _ in range(n)]
p = 0
for i in lst:
  p += i[1] - i[0] + 1
print(p)

### FIXED CODE ###

n = int(input())
lst = [[int(i) for i in input().split()] for _ in range(n)]
p = 0
for i in lst:
  p += i[1] - i[0] + 1
print(p)
# アキュムレータ版
D = 1000000007
n, m = map(int, input().split())
a = [0] * (10**5 + 2)
for i in range(m):
    a[int(input())] += 1

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


def calc(l, acc1, acc2):
    # print("calc(l, acc1, acc2):" + str(l) + str(acc1) + str(acc2))
    if (l == 1):
        return acc2
    else:
        oldacc2 = acc2
        if (a[n - l + 2] == 1):
            acc2 = 0
        else:
            acc2 = acc1 + acc2
        acc1 = oldacc2
        return calc(l - 1, acc1, acc2) % D


print(calc(n, s0, s1))

### 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])
N = input()
if N[-1] in '3'
    print('bon')
elif N[-1] in  "0168":
    print('pon')
else:
    print('hon')

### FIXED CODE ###

n = input()
if n[-1] in '24579':
    print('hon')
elif n[-1] in '0168':
    print('pon')
else:
    print('bon')
n = input()

print(n.replace(1, 9).replace(9, 1))



### FIXED CODE ###

n = str(input())
print(n.replace('1', 'a').replace('9', '1').replace('a', '9'))
n,k=map(int,input().split())
l=[input().split() for _ in range(n)]
b=[[0]*k for _ in range(k)]
w=[[0]*k for _ in range(k)]
anb=[[0]*k for _ in range(k)]
anw=[[0]*k for _ in range(k)]
ans=0
i=0
while i<n:
    m=(((int(l[i][0]))//k)+((int(l[i][1]))//k))%2
    if (m==0 and str(l[i][2])=="W"):
        w[int(l[i][0])%k][int(l[i][1])%k]+=1 
    elif (m==1 and str(l[i][2])=="B"):
        b[int(l[i][0])%k][int(l[i][1])%k]+=1
    elif (m==1 and str(l[i][2])=="W"):
        anw[int(l[i][0])%k][int(l[i][1])%k]+=1
    else:
        anb[int(l[i][0])%k][int(l[i][1])%k] +=1

from numpy import matrix

w=matrix(w)
b=matrix(b)
anw=matrix(anw)
anb=matrix(anb)

for a in range(0,k):
     for b in range(0,k):
         total=w[a:k][b:k].sum()+anw[0:a][0:b].sum()+b[a:k][b:k].sum()+anb[0:a][0:b].sum()
         ans=max(ans,total,n-total)
print(ans)


### FIXED CODE ###

a,b=map(int,input().split())
if (a*b)%2==0:
     print('Even')
else:
     print("Odd")
X = int(input())
A = int(input())

if A > X:
	print(0)
else:
	print(10)

### FIXED CODE ###

X, A = input().strip().split()
X, A = [int(X), int(A)]
if A > X:
	print(0)
else:
	print(10)
# -*- coding: utf-8 -*-
X,Y,Z = map(int,input().split())
a = []
while X >= Z+Y:
  a.append(1)
else:
  break
print(sum(a))

### FIXED CODE ###

# -*- coding: utf-8 -*-
X,Y,Z = map(int,input().split())
a = []
X = X-Z
while X >= Z+Y:
  a.append(1)
  X = X - (Z+Y)
print(sum(a))
n,k=map(int,input().split())
a = list(map(int,input().split()))
minus = [abs(a[i]) for i in range(n) if a[i] < 0][::-1]

plus = [a[i] for i in range(n) if a[i] >= 0]

min_ = 10**18

if len(plus) == 0:
  print(minus[k-1])
elif len(minus) == 0:
  print(plus[k-1])
elif len(plus) < len(minus):
  for i in range(min(k-1, len(plus))):
    min_ = min(min_, 2*plus[i]+minus[k-2-i], plus[i]+2*minus[k-2-i])
  i += 1
  min_ = min(min_, plus[i])
  print(min_)
else:
  for i in range(min(k-1, len(minus))):
    min_ = min(min_, 2*minus[i]+plus[k-2-i], minus[i]+2*plus[k-2-i])
  i += 1
  min_ = min(min_, minus[i])
  print(min_)  
  


### FIXED CODE ###

n,k=map(int,input().split())
a = list(map(int,input().split()))
minus = [0]+[abs(a[i]) for i in range(n) if a[i] < 0][::-1]

plus = [0]+[a[i] for i in range(n) if a[i] >= 0]

min_ = 10**18

if len(plus) == 1:
  print(minus[k])
elif len(minus) == 1:
  print(plus[k])
else:
  for i in range(min(k+1, len(plus))):
    if k-i < len(minus):
      min_ = min(min_, 2*plus[i]+minus[k-i], plus[i]+2*minus[k-i])
  print(min_)
X=int(input())
for A in range(int(X**(1/5))+2):
    if int((X-A**5)**(1/5))==((X-A**5)**(1/5)):
        B=-int((X-A**5)**(1/5))
        break
print(A,B)

### FIXED CODE ###

X=int(input())
flagp=False
flagm=False
flage=True
for A in range(-10**3,10**3):
    B5=A**5-X
    for B in range(10**3):
        if B5==B**5:
            flagp=True
            flage=False
            break
        elif B5==-B**5:
            flagm=True
            flage=False
            break
    else:
        continue
    break
if flagp:
    print(A,B)
elif flage:
    raise Exception
else:
    print(A,-B)
import numpy as np
N, K = map(int, input().split())
A = np.array(list(map(int, input().split())))
A -= 1

flg = [False for _ in range(N)]
loop = 0
town = []
i = 0
while flg[i] == False:
    town.append(i)
    flg[i] = True
    i = A[i]
    loop += 1
else:
    loop_start = i

print(town[K % loop + loop_start] + 1)

### FIXED CODE ###

import sys
import numpy as np
N, K = map(int, input().split())
A = np.array(list(map(int, input().split())))
A = np.insert(A, 0, 0)

flg = [False for _ in range(N + 1)]
town = []
i = 1
cnt = 0
for _ in range(N):
    town.append(i)
    flg[i] = True
    i = A[i]

if len(town) >= K:
    print(town[K])
else:
    s = i
    to_s = town.index(s)
    loop = len(town) - to_s
    print(town[(K - to_s) % loop + to_s])
n=input()
def ina():
  return map(int,raw_input().split())
a=ina()
b=ina()
c=0
for i in range(n):
  if a[i]>b[i]
  	c+=a[i]-b[i]
print c

### FIXED CODE ###

n=input()
def ina():
  return map(int,raw_input().split())
a=ina()
b=ina()
c=0
for i in range(n):
  if a[i]>b[i]:
  	c+=a[i]-b[i]
print c
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()

from collections import defaultdict, deque, Counter
from sys import exit
import heapq
import math
import fractions
import copy
from itertools import permutations
from operator import mul
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

from itertools import permutations
from math import factorial, hypot

N = getN()
A = getList()

course = []
x1 = A[0]
for i in A:
    x2 = i
    opt = math.gcd(x1, x2)
    course.append(opt)
    x1 = opt

reverse = []
y1 = A[-1]
for i in A[::-1]:
    y2 = i
    opt = math.gcd(y1, y2)
    reverse.append(opt)
    y1 = opt
reverse.sort()

ans = 0
for i in range(N):
    res = 0
    if i == 0:
        res = reverse[1]
    elif i == N - 1:
        res = course[-2]
    else:
        res = math.gcd(course[i - 1], reverse[i + 1])
    ans = max(ans, res)
print(ans)

### FIXED CODE ###

def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()

from collections import defaultdict, deque, Counter
from sys import exit
import heapq
import math
from fractions import gcd
import copy
from itertools import permutations
from operator import mul
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

from itertools import permutations
from math import factorial, hypot

N = getN()
A = getList()

course = []
x1 = A[0]
for i in A:
    x2 = i
    opt = gcd(x1, x2)
    course.append(opt)
    x1 = opt

reverse = []
y1 = A[-1]
for i in A[::-1]:
    y2 = i
    opt = gcd(y1, y2)
    reverse.append(opt)
    y1 = opt
reverse.sort()

ans = 0
for i in range(N):
    res = 0
    if i == 0:
        res = reverse[1]
    elif i == N - 1:
        res = course[-2]
    else:
        res = gcd(course[i - 1], reverse[i + 1])
    ans = max(ans, res)
print(ans)
N = int(input())
A = []
for _ in range(N):
    A.append(int(input()))
pro = 1
for a in A:
    if a:
        pro *= a
if pro % 2 == 1:
    print('first')
else:
    print('second')

### FIXED CODE ###

N = input()
cnt = 0
for n in N:
    if n == '2':
        cnt += 1
print(cnt)