Harryxun/stf_run huggingface dataset:
a, b = map(int,input().split())
mae=[]
usi=[]
count=0

for i in range(a,b+1):
  for j in range(len(i)):
    mae.append(i[j])
  for j in range(len(i),0,-1):
    usi.append(i[j])
  if mae==usi:
    count+=1

print(count)

### FIXED CODE ###

a, b = map(int,input().split())

count=0

for i in range(a,b+1):
  mae=[]
  usi=[]
  for j in range(len(str(i))):
    mae.append(str(i)[j])
  for j in range(int(len(str(i))-1),-1,-1):
    usi.append(str(i)[j])
  if mae==usi:
    count+=1

print(count)
n, q = map(int, input().split())
s = str(input())
a = []
b = []
for i in range(q):
    x, y = map(int, input().split())
    a.append(x)
    b.append(y)

ss = []
ll = []
for i in range(n):
    c = s[a[i]:b[i]]
    d = c.count('AC')
    print(d)

### FIXED CODE ###

n, q = map(int, input().split())
s = str(input())
d = [list(map(int, input().split())) for i in range(q)]
a = [0,0]
cnt = 0
for i in range(1, n):
    if s[i-1]+s[i] == 'AC':
        cnt += 1
    a.append(cnt)

for i in range(q):
    print(a[d[i][1]]-a[d[i][0]])
S = input()
T = input()

countbox=[]
for n in range(len(S)-2-len(T)+1):
    count =0
    for i in range(len(T)):
        if T[i] != S[i+n+1]:
            count+=1
    countbox.append(count)

print(min(countbox))

### FIXED CODE ###

S = input()
T = input()

if len(S)==len(T):
    count=0
    for i in range(len(T)):
        if T[i] != S[i]:
            count+=1
    print(count)

else:
    countbox=[]
    for n in range(len(S)-len(T)+1):
        count =0
        for i in range(len(T)):
            if T[i] != S[i+n]:
                count+=1
        countbox.append(count)
    print(min(countbox))
import sys
sys.setrecursionlimit(10**7)

debug = True
#debug = False

def dprint(*objects):
    if debug == True:
        print(*objects)

class Event:
    def __repr__(self):
            return str(self.__dict__)

class User:
    def __repr__(self):
            return str(self.__dict__)

def solve():
    n, q = map(int, input().split())
    l_event = []
    for i in range(n):
        s, t, x = map(int, input().split())

        # 追加イベント
        e = Event()
        e.time = s-x
        e.type = 1 # add
        e.pos = x
        l_event.append(e)

        # 削除イベント
        e = Event()
        e.time = t-x
        e.type = -1 # delete
        e.pos = x
        l_event.append(e)

    l_user = []
    for i in range(q):
        d = int(input())

        # ユーザ評価イベント
        u = User()
        u.time = d + 0.5 # ユーザが出発する時刻までのイベントを先に処理したいので、0.5ずらす
        u.idx = i
        l_user.append(u)

    # リストを時刻でソート O(NlogN)
    l_event = sorted(l_event, key=lambda e: e.time)

    # ユーザも時刻でソート O(QlogQ)
    l_user = sorted(l_user, key=lambda e: e.time)


    ans = {i:-1 for i in range(q)} # 答えの配列
    s_stop = set()
    current_user_idx = 0

    # リストを順に処理する 全体 O(N + Qlog(2N))
    for e in l_event: # 中身が O(1) なら O(N)

        # 次処理するイベントの時刻より前のユーザをすべて処理する
        while(True): # この while 文は最大Q回しか回らないので、全体 O(Qlog(2N))
            u = l_user[current_user_idx]
            if u.time < e.time:
                if len(s_stop) != 0:
                    ans[u.idx] = min(s_stop)

                current_user_idx += 1 # 次のユーザへ
                if current_user_idx >= len(l_user):  # 人の処理が終わっている場合、終わり
                    break
            else:
                break

        if e.type == 1: # add
            s_stop.add(e.pos)
        else: # delete
            s_stop.remove(e.pos)

    for i in range(q):
        print(ans[i])

solve()

### FIXED CODE ###

import sys;input=sys.stdin.readline

n,q=map(int, input().split())
event=[]
for _ in range(n):
    s,t,x=map(int,input().split())
    event.append((s-x-0.5,1,x))
    event.append((t-x-0.5,-1,x))
for i in range(q):
    event.append((int(input()),0,i))

event.sort()
is_stop=False
stop=set()
minstop=float('inf')
ans=[-1]*q
for t,e,x in event:
    if e > 0:
        stop.add(x)
        if x<minstop:
            minstop=x
            is_stop=True
    elif e<0:
        stop.remove(x)
        if minstop==x:
            is_stop=False
    elif len(stop)>0:
        if not is_stop:
             minstop=min(stop)
             is_stop=True
        ans[x]=minstop

print('\n'.join(map(str, ans)))
N = int(input())
for a in range(1,3501):
    for b in range(1,3501):
        m =  (4*a*b) - N*(a+b)
        if m> 0 & N*a*b % m == 0:
            c = (N*a*b)//m
            break
    else:
        continue
    break
print(a,b,c)


### FIXED CODE ###

N = int(input())
for a in range(1,3501):
    for b in range(1,3501):
        m =  (4*a*b) - N*(a+b)
        if m> 0 and N*a*b % m == 0:
            c = (N*a*b)//m
            break
    else:
        continue
    break
print(a,b,c)
i = list(map(int, input().split(',')))
flg = 0
count = 0
while(flg == 0):
    if(i[0] % 2 == 0 and i[1] % 2 == 0 and i[2] % 2 == 0):
        i[0] /= 2
        i[1] /= 2
        i[2] /= 2
        count += 1
    else:
        flg = 1

print(count)


### FIXED CODE ###

# 自分の回答
n = int(input())
array = list(map(int, input().split()))
flg = 0
count = 0
while(flg == 0):
    j = 0
    for j in range(n):
        if(array[j] % 2 == 0):
            array[j] /= 2
            j += 1
            if(j == (n -1)):
                count += 1
        else:
            flg = 1
            break
print(count)
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math

# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N,Z,W = inputMap()
    A = inputList()
    
    A_max = max(A)
    A_min = min(A)
    
    tmp2 = abs(A[-1] - W)
    tmp3 = 0
    if A_max != A[-1]:
        tmp3 = abs(A_max - A[-1])
    tmp4 = 0
    if A_min != A[-1] and A_min != A[0]:
        tmp4 = abs(A[-1] - A_min)
    
    '''
    tmp5 = 0
    if A_max != A[-1] and A_min == A[-1]:
        tmp5 = abs(A_max - A_min)
        '''
    
    print(max(tmp2, tmp3, tmp4, tmp5))
            	
if __name__ == "__main__":
	main()


### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math

# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N,Z,W = inputMap()
    A = inputList()
    
    if N ==1:
        print(abs(A[-1]-W))
    else:
        print(max(abs(A[-1]-W), abs(A[-2]-A[-1])))
    
    '''
    A_max = max(A)
    A_min = min(A)
    
    ans = 0
    tmp1 = abs(Z - A[-1])
    tmp2 = abs(A[-1] - W)
    tmp3 = abs(A_max - A[-1])
    tmp4 = abs(A[-1] - A_min)
    
    tmp5 = 0
    if A_max == A[-1] or A_min == A[-1]:
        tmp5 = abs(A_max - A_min)
    
    print(max(tmp1, tmp2, tmp3, tmp4, tmp5))
    '''
            	
if __name__ == "__main__":
	main()
import sys

input_methods=['clipboard','file','key']
using_method=1
input_method=input_methods[using_method]

IN=lambda : map(int, input().split())
mod=1000000007

#+++++

def is_ok(sd, st, t):
	if len(sd) < st+len(t):
		return False
	for i, c in enumerate(sd[st:st+len(t)]):
		if c != '?' and t[i] != c:
			return False
	return True
	
def to_aaa(a_str):
	rr=list(a_str)
	for i, c in enumerate(rr):
		rr[i] = 'a' if c == '?' else c
	ret = ''.join(rr)
	return ret

def mk_s(a_s_dash, i, t):
	front = to_aaa(a_s_dash[:i])
	back = to_aaa(a_s_dash[i+len(t):])
	ret = front+t+back
	#pa((i,t,front,t,back,ret))
	return ret
			
def main():
	s_dash = input()
	t=input()
	dd='UNRESTORABLE'
	qq='?'
	
	aa=[]
	for i, _ in enumerate(s_dash[:len(t)+1]):
		if is_ok(s_dash,i,t):
			aa.append(mk_s(s_dash, i, t))
			#pa(aa)
			
	if len(aa)>0:
		
		aa.sort()
		ret = aa[0]
		print(ret)
		return
	aa=aa.copy()
	print(dd)
	return
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

### FIXED CODE ###

import sys

input_methods=['clipboard','file','key']
using_method=1
input_method=input_methods[using_method]

IN=lambda : map(int, input().split())
mod=1000000007

#+++++

def is_ok(sd, st, t):
	if len(sd) < st+len(t):
		return False
	for i, c in enumerate(sd[st:st+len(t)]):
		if c != '?' and t[i] != c:
			return False
	return True
	
def to_aaa(a_str):
	rr=list(a_str)
	for i, c in enumerate(rr):
		rr[i] = 'a' if c == '?' else c
	ret = ''.join(rr)
	return ret

def mk_s(a_s_dash, i, t):
	front = to_aaa(a_s_dash[:i])
	back = to_aaa(a_s_dash[i+len(t):])
	ret = front+t+back
	#pa((i,t,front,t,back,ret))
	return ret
			
def main():
	s_dash = input()
	t=input()
	dd='UNRESTORABLE'
	qq='?'
	
	aa=[]
	for i, _ in enumerate(s_dash[:len(s_dash)+1]):
		#pa((s_dash,i,t))
		if is_ok(s_dash,i,t):
			aa.append(mk_s(s_dash, i, t))
			#pa(aa)
			
	if len(aa)>0:
		aa.sort()
		ret = aa[0]
		print(ret)
		return
		
	print(dd)
	return
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)
X=int,input()
A=int,input()
B=int,input()
print((X-A)%B)



### FIXED CODE ###

X=int(input())
A=int(input())
B=int(input())
print((X-A)%B)
N, M, C = map(int, input().split())

B = list(input().split())

ans = []

src = []

for i in range(N):
  src.append(list(map(int, input().split())))
  
  for n in range(N):
    d = src[i][n]*B[n] + C
    if (d > 0):
      ans.append(1)

print(ans.count(1))

  
  

### FIXED CODE ###

N, M, C = map(int, input().split())
 
B = list(map(int, input().split()))
 
ans = 0
 
src = []

for i in range(N):
  src.append(list(map(int, input().split()))) 
  
for i in range(N):
  d = C
  for n in range(M):
    d += src[i][n]*B[n]
  if (d > 0):
    ans+= 1

print(ans)
s = input()

tmp = []
for i in range(len(s)-1):
        if s[i] != s[i+1]:
                tmp.append(max(i+1,len(s)-(i+1)))

print(max(tmp))

### FIXED CODE ###

s = input()



tmp = []
for i in range(len(s)-1):
        if s[i] != s[i+1]:
                tmp.append(max(i+1,len(s)-(i+1)))

if len(tmp) == 0:
        #元から全部同じ
        print(len(s))
else:
        print(min(tmp))
# -*- coding: utf-8 -*-
"""
"""
import sys
import re

def solve(exp):
    p1 = re.compile('^0+')
    p2 = re.compile('\+0')
    for i in range(10):
        modified_exp = exp.replace('X', str(i))
        left, right = modified_exp.split('=')
        left = p1.sub('', left)
        left = p2.sub('+', left)
        right = p1.sub('', right)
        right = p2.sub('+', right)
        if eval(left) == eval(right):
            return i
    return 'NA'


def main(args):
    for line in sys.stdin:
        result = solve(line.strip())
        print(result)


if __name__ == '__main__':
    main(sys.argv[1:])

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0110
"""
# runtime error
import sys
import re

def solve(exp):
    p1 = re.compile('^0+')
    for i in range(10):
        modified_exp = exp.replace('X', str(i))
        left, right = modified_exp.split('=')
        left1, left2 = left.split('+')

        left1 = p1.sub('', left1)
        if left1 == '':
            left1 = '0'
        left2 = p1.sub('', left2)
        if left2 == '':
            left2 = '0'
        right = p1.sub('', right)
        if right == '':
            right = '0'

        # print('{} + {} <=> {}'.format(left1, left2, right))
        if int(left1) + int(left2) == int(right):
            return i
    return 'NA'



def solve2(exp):
    for i in range(10):
        left, right = exp.split('=')
        left1, left2 = left.split('+')

        left1 = left1.replace('X', str(i))
        left2 = left2.replace('X', str(i))
        right = right.replace('X', str(i))
        if len(left1) > 1 and left1[0] == '0':
            continue
        if len(left2) > 1 and left2[0] == '0':
            continue
        if len(right) > 1 and right[0] == '0':
            continue
        if int(left1, base=10) + int(left2, base=10) == int(right, base=10):
            return i
    return 'NA'




def main(args):
    for line in sys.stdin:
        #result = solve(line.strip())
        #print(result)
        result = solve2(line.strip())
        print(result)


if __name__ == '__main__':
    main(sys.argv[1:])
import numpy as np
a, b = list(map(int, input().split()))
print(np.lcm(a, b))

### FIXED CODE ###

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

a, b = list(map(int, input().split()))
print(int(lcm(a, b)))
a = int(input())

b = []

for i in a:
    b.append((input().split())

res = 0

for i in b:
    if (i[1] == 'BTC'):
        res += i[0]*380000
    else:
        res += i[0]

print(res) 

### FIXED CODE ###

a = int(input())

b = []

for i in range(a):
    b.append(input().split())

res = 0

for i in b:
    if (i[1] == 'BTC'):
        res += float(i[0])*380000
    else:
        res += int(i[0])

print(res)
import time
import random
N = int(input())
s = str(input())
maxlen = N//2
start = time.time()
def solve(tgt):
    for i in range(N-tgt*2+1):
        if s[i:i+tgt] in s[i+tgt:]:
            return True
    return False

ng = maxlen + 1
ok = 0
if N>650:
    ok = 2
first = 1
while ng-ok > 1:
    end = time.time()
    if end-start > 1.5:
        if ok >= 100:
            assert()
        r = random.random.randint(ok,ng-1)
        print(r)
        exit()
    tgt = (ok+ng)//2
    if first == 1:
        tgt = 16
        first = 0
    if N>=2500 and ng != maxlen + 1:
        ng = 128
    if solve(tgt):
        ok = tgt
    else:
        ng = tgt
print(ok)


### FIXED CODE ###

from collections import defaultdict as dd
N = int(input())
s = str(input())
maxlen = N//2

def solve(tgt):
    dic = dd(int)
    st = s[tgt:2*tgt]
    dic[st] += 1
    ls = [st]
    for char in s[2*tgt:]:
        st = st[1:]+char
        dic[st] += 1
        ls.append(st)
    st = s[:tgt]
    if dic[st] > 0:
        return True
    dic[ls[0]] -= 1
    for i,char in enumerate(s[tgt:N-tgt]):
        st = st[1:]+char
        if dic[st] > 0:
            return True
        dic[ls[i+1]] -= 1
    return False

ng = maxlen + 1
ok = 0
while ng-ok > 1:
    tgt = (ok+ng)//2
    if solve(tgt):
        ok = tgt
    else:
        ng = tgt
print(ok)
N=int(input())
i=0

flag=0
beforeTxy=[0,0,0]
while i<N:
  afterTxy=list(map(int,input().split()))
  #print(afterTxy)
  unk=afterTxy[0]-beforeTxy[0]-abs(afterTxy[1]-beforeTxy[1])-abs(afterTxy[2]-beforeTxy[2])
  unk2=afterTxy[0]-beforeTxy[0]-abs(afterTxy[1]-beforeTxy[1])

  if unk>=0 and unk%2!=0 and unk2%2!=0:
    flag=1
  beforeTxy=afterTxy
  i=i+1

if flag==0:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a, b = map(int, input().split())
if a*b%2==0:
  print("Even")
else:
  print("Odd")
w = ['Sunny', 'Cloudy', 'Rainy']
s = input()
i = w.index(s) +1
if i==3:
  i=0
print(weather(i))

### FIXED CODE ###

w = ['Sunny', 'Cloudy', 'Rainy']
s = input()
i = w.index(s) +1
if i==3:
  i=0
print(w[i])
x,y,a,b,c = map(int,input(),split())
p = sort(list(map(int,input(),split())))
q = sort(list(map(int,input(),split())))
r = list(map(int,input(),split()))
ans = 0

for k in range(1,x+1):
    r.append(p[-k])
for v in range(1,y+1):
    r.append(p[-v])

rs = sort(r)

for i in range(1,X+Y+1):
    ans += rs[-i]
print(str(ans))

### FIXED CODE ###

import sys
sys.setrecursionlimit(4100000)

x,y,a,b,c = map(int,input().split())
p = sorted(list(map(int,input().split())))
q = sorted(list(map(int,input().split())))
r = list(map(int,input().split()))
ans = 0

for k in range(1,x+1):
    r.append(p[-k])
for v in range(1,y+1):
    r.append(q[-v])

rs = sorted(r)

for i in range(1,x+y+1):
    ans += rs[-i]
print(str(ans))
n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
c=1
for i in range(n):
  if a[i]==c:
    ans[i]=1
    c+=1
print(n-sum(ans))    

### FIXED CODE ###

a=int(input())
b=int(input())
print(6-a-b)
# -*- coding: utf-8 -*-
"""
Created on Sun Sep 23 22:00:37 2018
ABC110D
@author: maezawa
"""
import collections

def comb(n, r):
    if n == 0 or r == 0:
        return 1
    return comb(n, r-1)*(n-r+1)//r

n, m = list(map(int, input().split()))

mod = 10**9+7
np = int(10**4.5 + 10)
is_prime = [True]*(np+1)

is_prime[0] = False
is_prime[1] = False

for i in range(2, np//2):
    if is_prime[i] == True:
        for j in range(2*i,np+1,i):
            is_prime[j] = False

prime_numbers = [i for i in range(np+1) if is_prime[i]]

pds = []
for i in prime_numbers:
    if i > m//2:
        break
    md = m
    while md%i == 0:
        pds.append(i)
        md = md//i
    if md > np:
        pds.append(md)
if pds == []:
    pds.append(m)

#print(pds)
cpds = collections.Counter(pds)
#print(cpds)
ans = 1
for i in cpds.values():
    ans = ans*comb(n+i-1,i)%mod

print(ans)


### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Sun Sep 23 22:00:37 2018
ABC110D
@author: maezawa
"""
import collections

def comb(n, r):
    if n == 0 or r == 0:
        return 1
    return comb(n, r-1)*(n-r+1)//r

n, m = list(map(int, input().split()))

mod = 10**9+7
np = int(10**4.5 + 10)
is_prime = [True]*(np+1)

is_prime[0] = False
is_prime[1] = False

for i in range(2, np//2):
    if is_prime[i] == True:
        for j in range(2*i,np+1,i):
            is_prime[j] = False

prime_numbers = [i for i in range(np+1) if is_prime[i]]

pds = []
for i in prime_numbers:
    if i > m//2:
        break
    md = m
    while md%i == 0:
        pds.append(i)
        md = md//i
mul = 1
for i in pds:
    mul *= i
if m != mul:
    pds.append(m//mul)

#print(pds)
cpds = collections.Counter(pds)
#print(cpds)
ans = 1
for i in cpds.values():
    ans = ans*comb(n+i-1,i)%mod

print(ans)
def main():
    N, Q = map(int, input().split())
    E = [[] for i in range(N+1)]
    counter = [0] * (N+1)

    for i in range(N-1):
        a, b = map(int, input().split())
        E[a].append(b)
        E[b].append(a)

    def mktree(v, parent, E):
        children = E[v]
        #print(v, ", parent=%d"%parent, E[v])
        children.remove(parent)
        for child in children:
            mktree(child, v, E)

    for child in E[1]:
        mktree(child, 1, E)

    if 1==0:
        for child in E[1:]:
            i+=1
            print(i, child)


    for i in range(Q):
        # 頂点p を根とする部分木に含まれるカウンターにxを足す
        p, x = map(int, input().split())
        counter[p] += x

    def get(v, children, counter):
        c = counter[v]
        for child in children[v]:
            counter[child] += c
            get(child, children, counter)

    get(1, E, counter)
    print(*[counter[1:]])

main()






### FIXED CODE ###

def main():
    import sys
    sys.setrecursionlimit(2*10**5)
    N, Q = map(int, input().split())
    E = [[] for i in range(N+1)]
    counter = [0] * (N+1)

    for i in range(N-1):
        a, b = map(int, input().split())
        E[a].append(b)
        E[b].append(a)

    for i in range(Q):
        # 頂点p を根とする部分木に含まれるカウンターにxを足す
        p, x = map(int, input().split())
        counter[p] += x

    queue = []

    parent = [1]
    def mktree(v, parent, E):
        children = E[v]
        children.remove(parent)
        for child in children:
            mktree(child, v, E)

    while parent:
        p = parent.pop()
        for child in E[p]:
            E[child].remove(p)
            parent.append(child)

    def get(v, children, counter):
        c = counter[v]
        for child in children[v]:
            counter[child] += c
            get(child, children, counter)

    parent = [1]
    while parent:
        p = parent.pop()
        c = counter[p]
        for child in E[p]:
            counter[child] += c
            parent.append(child)

    print(" ".join(str(x) for x in counter[1:]))

main()
N=int(input())
S={}
cnt=0
for i in range(N):
    Z=sorted(list(input()))
    K="".join(Z)
    if K in S:
        S[K]+=1
    else:
        S[K]=1
for T in S.values():
    mul=1
    v=1
    if T>1:
        for t in range(T,1,-1):
            mul*=t
        v=mul/2
        cnt+=v
    else:
        continue
print(int(cnt))    

### FIXED CODE ###

N=int(input())
S={}
cnt=0
for i in range(N):
    Z=sorted(list(input()))
    K="".join(Z)
    if K in S:
        S[K]+=1
    else:
        S[K]=1
for T in S.values():
    mul=1
    v=1
    if T>1:
        mul=(T*(T-1))//2
        cnt+=mul
    else:
        continue
print(int(cnt))
L = input()
def dp(index,tight):
    if index == -1:
        return tight == 1
    if not (index,tight) in memo:
        if L[index] == "1" and tight:
            memo[(index,tight)] = 2*dp(index-1,1)
        elif L[index] == "1" and not tight:
            memo[(index,tight)] = 3*dp(index-1,0) + dp(index-1,1)
        elif L[index] == "0" and tight:
            memo[(index,tight)] = dp(index-1,1)
        else:
            memo[(index,tight)] = 3*dp(index-1,0)
    return memo[(index,tight)]
memo = {}
a = dp(len(L)-1,1)
memo = {}
b = dp(len(L)-1,0)
print(a+b)

### FIXED CODE ###

L = input()
n = len(L)
mod = 10**9+7
dp1 = [0]*(n+1)
dp2 = [0]*(n+1)
dp1[0] = 1
for i in range(n):
    if L[i] == "1":
        dp1[i+1] = (dp1[i]*2)%mod
        dp2[i+1] = (dp1[i] + dp2[i]*3)%mod
    else:
        dp1[i+1] = dp1[i]
        dp2[i+1] = (dp2[i]*3)%mod
print((dp1[n]+dp2[n])%mod)
a_list = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
a = int(input())
print(a_list[a+1])

### FIXED CODE ###

a_list = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
a = int(input())
print(a_list[a-1])
m=int(input())
count=0#求めるトーナメント数
#複数行2数値を受け取る
x = []
y = []
for i in range(m):
    x1,y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
print(x,y)

#最初のエントリーする人を求める
n=str()#空の文字列を作成
for j in range(0, m):#標準入力の数字を連結させてnをつくる
  n += str(x[j])*y[j]#エントリーする人の数
print(n)

#再帰呼び出しする関数
def Selection(entry):  
  l=[]#空のリストを作成。ここに選出人数を入れていく
  for k in range(0, len(n)-1):
  
    int_sum=int(n[k],10)+int(n[k+1],10)#10進数で足し算
    n_replaced=n.replace(n[k:k+2:1],str(int_sum))
    l.append(int(n_replaced,10))#このままだとlの各要素がstr型なのでintに変換
  print(l)
  n=max(l)#選出人数は最大となるものを選ぶ
  
  if n<10:
    print(count)
    exit()
  else:
    count += 1

while True:
  Selection(n)

### FIXED CODE ###

x,y=map(int,input().split())

if (x==y==1):
  output=1000000
elif (x*y==2):
  output=500000
elif (x*y==3):
  output=400000
#elif (x*y==4):4*1が存在
elif (x==y==2):
  output=400000
elif (x*y==6):
  output=300000
elif (x*y==9):
  output=200000
  
#x or y  
elif (x==1 or y==1):
  output=300000
elif (x==2 or y==2):
  output=200000
elif (x==3 or y==3):
  output=100000
else:
  output=0
print(output)
def main():
  N, K = list(map(int, input().split()))
  P = list(map(int, input().split()))

  min_ = float('inf')

  all_ = list(range(N))
  for items in itertools.combinations(all_, K):
    sum_ = sum([P[i] for i in items])
    min_ = min(min_, sum_)

  print(min_)


if(__name__ == '__main__'):
  main()

### FIXED CODE ###

def main():
  N, K = list(map(int, input().split()))
  P = list(map(int, input().split()))

  P.sort()
  print(sum(P[:K]))


if(__name__ == '__main__'):
  main()
import math
print(2*int(input()*math.pi))

### FIXED CODE ###

import math
print(int(input())*2*math.pi)