Harryxun/stf_run huggingface dataset:
n,m= map(int, input().split())
k=[]*n
a=[]*n
s=set(range(1,M+1))
for i in range(n):
    tmp=list(map(int, input().split()))
    k[i]=tmp[0]
    a[i]=tmp[1:]
    s= s & set(a[i])

print(len(s))




### FIXED CODE ###

n,m= map(int, input().split())
k=[]*n
a=[]*n
s=set(range(1,m+1))
for i in range(n):
    tmp=list(map(int, input().split()))
    a=tmp[1:]
    s= s & set(a)

print(len(s))
import math
r=int(input())
print(r*r*math.pi,2*r*math.pi)



### FIXED CODE ###

import math
r=float(input())
print(r*r*math.pi,2*r*math.pi)
import numpy as np

n = int(input())
A = np.array([int(i) for i in input().split()])

A=np.sort(A)
s=A[0]
for i in range(max([n, s])):
    c = A[0]
    A = A % c
    A[0] = c
    z=A.count(0)
    A=np.sort(A)[z:]
    for j in range(len(A)):
        if A[0] != 0:
            break
        A = np.delete(A, 0)
    if len(A) == 1:
        break
print (A[0])

### FIXED CODE ###

import numpy as np

n = int(input())
A = np.array([int(i) for i in input().split()])

A=np.sort(A)
s=A[0]
for i in range(max([n, s])):
    c = A[0]
    A = A % c
    A[0] = c
    z=len(A) - np.count_nonzero(A)
    A=np.sort(A)[z:]
    if len(A) == 1:
        break
print (A[0])
#!/usr/bin/env python3

import sys
import pprint
import itertools

sys.setrecursionlimit(10 ** 6)

class Logger:
	def __init__(self, debug):
		self.debug = debug
	def print(self, *args):
		if self.debug:
			pprint.pprint(args)


def main():
	log = Logger(0)
	n, m, x = map(int, sys.stdin.readline().split())
	c = []
	a = []
	for i in range(n):
		ci, *ai = map(int, sys.stdin.readline().split())
		c.append(ci)
		a.append(ai)
	ans = 10**9
	for i in range(2**n):
		cost = 0
		rikai = [0]*n
		case = []
		for j in range(n):
			case.append(i>>j & 1)
		for j in range(n):
			if not case[j]:
				continue
			cost += c[j]
			for k in range(m):
				rikai[k] += a[j][k]
		log.print(case, rikai, len(list(filter(lambda z:z>=x, rikai))))
		if len(list(filter(lambda z:z>=x, rikai))) == m:
			ans = min(cost, ans)
	if ans == 10**9:
		print(-1)
		exit()
	print(ans)





main()

### FIXED CODE ###


#!/usr/bin/env python3

import sys
import pprint
import itertools

sys.setrecursionlimit(10 ** 6)

class Logger:
	def __init__(self, debug):
		self.debug = debug
	def print(self, *args):
		if self.debug:
			pprint.pprint(args)


def main():
	log = Logger(0)
	n, m, x = map(int, sys.stdin.readline().split())
	c = []
	a = []
	for i in range(n):
		ci, *ai = map(int, sys.stdin.readline().split())
		c.append(ci)
		a.append(ai)
	ans = 10**9
	log.print(a)
	for i in range(2**n):
		cost = 0
		rikai = [0]*m
		case = []
		for j in range(n):
			case.append(i>>j & 1)
		for j in range(n):
			if not case[j]:
				continue
			cost += c[j]
			for k in range(m):
				rikai[k] += a[j][k]
		# log.print(case, rikai, len(list(filter(lambda z:z>=x, rikai))))
		if len(list(filter(lambda z:z>=x, rikai))) == m:
			ans = min(cost, ans)
	if ans == 10**9:
		print(-1)
		exit()
	print(ans)





main()
import numpy as np
H,W,K = map(int,input().split())
S = [list(str(input())) for _ in range(W)]

l = np.array([[0 for _ in range(W)]]*H)
l = l.tolist()
k= 1
for i in range(H):
  for j in range(W):
    if S[i][j] == '#':
      l[i][j] = str(k)
      k += 1
for i in range(H):
  for j in range(W):
    if l[i][j] == 0:
      if j > 0:
        l[i][j] = l[i][j-1]
      else:
        for m in range(1,W-j):
          if l[i][j+m] != 0:
            l[i][j] = l[i][j+m]
            break
  print(' '.join(l[i]))

### FIXED CODE ###

import numpy as np
H,W,K = map(int,input().split())
S = [list(str(input())) for _ in range(H)]

l = np.array([['0' for _ in range(W)]]*H)
l = l.tolist()
k= 1
for i in range(H):
  for j in range(W):
    if S[i][j] == '#':
      l[i][j] = str(k)
      k += 1
for i in range(H):
  for j in range(W):
    if l[i][j] == '0':
      if i > 0:
        l[i][j] = l[i-1][j]
      else:
        for m in range(1,H-i):
          if l[i+m][j] != '0':
            l[i][j] = l[i+m][j]
            break
for i in range(H):
  for j in range(W):
    if l[i][j] == '0':
      if j > 0:
        l[i][j] = l[i][j-1]
      else:
        for m in range(1,W-j):
          if l[i][j+m] != '0':
            l[i][j] = l[i][j+m]
            break
  print(' '.join(l[i]))
import sys, math, collections, heapq, itertools
from bisect import bisect_left
F = sys.stdin
def single_input(): return F.readline().strip("\n")
def line_input(): return F.readline().strip("\n").split()
  
def solve():
    Q = int(single_input())
    n, a, b = map(int, line_input())
    left, right = collections.deque([a]), collections.deque([a])
    minans =  b
    for i in range(1, Q):
        queri = [int(i) for i in line_input()]
        if queri[0] == 1:
            a, b = queri[1:]
            minans += b
            if left[-1] <= a <= right[0]:
                left.append(a)
                right.appendleft(a)
            elif a < left[-1]:
                minans += left[-1] - a
                insertpos = bisect_left(left, a)
                left.insert(insertpos, a)
                left.insert(insertpos, a)
                right.appendleft(left.pop())
            else:
                minans += a - right[0]
                insertpos = bisect_left(right, a)
                right.insert(insertpos, a)
                right.insert(insertpos, a)
                left.append(right.popleft())
        else: print(left[-1], minans)
    return 0
  
if __name__ == "__main__":
    solve()

### FIXED CODE ###

import sys, math, collections, heapq, itertools
from bisect import bisect_left
F = sys.stdin
def single_input(): return F.readline().strip("\n")
def line_input(): return F.readline().strip("\n").split()
def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while a % b > 0: a, b = b, a % b
    return b
  
def solve():
    Q = int(single_input())
    n, a, b = map(int, line_input())
    left, right = [-a], [a]
    heapq.heapify(left)
    heapq.heapify(right)
    minans =  b
    for i in range(1, Q):
        queri = [int(i) for i in line_input()]
        if queri[0] == 1:
            a, b = queri[1:]
            minans += b
            left_upper = -1 * heapq.heappop(left)
            right_lower = heapq.heappop(right)
            if left_upper <= a <= right_lower:
                heapq.heappush(left, -a)
                heapq.heappush(left, -1 * left_upper)
                heapq.heappush(right, a)
                heapq.heappush(right, right_lower)
            elif a < left_upper:
                minans += left_upper - a
                heapq.heappush(left, -a)
                heapq.heappush(left, -a)
                heapq.heappush(right, left_upper)
                heapq.heappush(right, right_lower)
            else:
                minans += a - right_lower
                heapq.heappush(left, -1 * left_upper)
                heapq.heappush(left, -1 * right_lower)
                heapq.heappush(right, a)
                heapq.heappush(right, a)
        else:
            left_lower = -1 * heapq.heappop(left)
            print(left_lower, minans)
            heapq.heappush(left, -1 * left_lower)
    return 0
  
if __name__ == "__main__":
    solve()
s=input()
q= int(input())

for iq in range(1,q+1):
	t=input().split()
	if t[0]=='1':
		s=s[::-1]
	else:
		if t[1]=='1':
#			s=t[2]+s
            s='{}{}'.format(t[2],s)
#			s=f"{t[2]}{s}"
#			list1=[t[2],s]
#			s="".join(list1)
#			s="".join(t[2],s)
		else:
#			s=s+t[2]
            s='{}{}'.format(s,t[2])
#			s=f"{s}{t[2]}" 
#			list2=[s,t[2]]
#			s="".join(list2)
#			s="".join(s,t[2])

print (s)

### FIXED CODE ###

s=input()
q= int(input())

top=""
btm=""

iturn=0
for iq in range(1,q+1):
	t=input().split()
	if t[0]=='1':
		iturn=iturn+1   	
	else:
		iturn2=iturn%2
		if (t[1]=='1' and iturn2==0) or (t[1]=='2' and iturn2==1):
#			s=t[2]+s
#			s='{}{}'.format(t[2],s)
			top=t[2]+top
		else:
#			s=s+t[2]
#			s='{}{}'.format(s,t[2])
			btm=btm+t[2]

if iturn%2==0:
	s=top+s+btm
else:
	s=btm[::-1]+s[::-1]+top[::-1]
print (s)
X, Y, A, B, C = [int(i) for i in input().split()]
P = [int(i) for i in input().split()]
Q = [int(i) for i in input().split()]
R = [int(i) for i in input().split()]

 P = sorted(P)
 Q = sorted(Q)
 R = sorted(R)

 
A= P[:X] + Q[:Y] + R
A = sorted(A)
print(sum(A[:X+Y]))

### FIXED CODE ###

X, Y, A, B, C = [int(i) for i in input().split()]
P = [int(i) for i in input().split()]
Q = [int(i) for i in input().split()]
R = [int(i) for i in input().split()]

P = sorted(P, reverse=True)
Q = sorted(Q, reverse=True)
R = sorted(R, reverse=True)

 
A= P[:X] + Q[:Y] + R
A = sorted(A, reverse=True)
print(sum(A[:X+Y]))
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
str = list(raw_input())
f = int(str[0]+str[1])
l = int(str[2]+str[3])
# 文字列の入力
if(f == 0):
    if(l == 0):
        ans = "NA"
    if(l > 0 and 13> l):
        ans = "YYMM"
    if(l >= 13):
        ans= "NA"
elif(f > 0 and 13 > f):
    if(l == 0):
        ans = "MMYY"
    if(l > 0 and 13 > l):
        ans = "AMBIGUOUS"
    if(l >= 13):
        ans= "MMYY"
elif(f >= 13):
    if(l == 0):
        ans = "NA"
    if(l > 0 and 13> l):
        ans = "YYMM"
    if(l >= 13):
        ans= "NA"

print ans
# 出力


### FIXED CODE ###

# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
n, k = map(int, raw_input().split())

# 文字列の入力
str = list(raw_input())

str[k-1] = str[k-1].lower()
# 出力
newstr = "".join(str)
print(newstr)
from collections import deque


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

ab_list = [list(map(int,input().split())) for _ in range(m)]

ab_count = {key:[] for key in range(1,n+1)}

for i in range(m):
    ab_count[ab_list[i][0]].append(ab_list[i][1])
    ab_count[ab_list[i][1]].append(ab_list[i][0])

for i in range(m):
    if len(ab_count[i]) == 0:
        print("No")
        exit()

#print(ab_count)

que = deque()

#始点は1、階層は0からスタート
que.append([1,0])

checked_dict = {key:[] for key in range(1,n+1)}
temp_dict = {key:[] for key in range(1,n+1)}
where = 0

while que:
    x_pop = que.popleft()
    x = x_pop[0]
    if where != x_pop[1]:
        #階層が代わったから、temp_dictをchecked_dictへ反映させる処理
        for k in range(1,n+1):
            if len(checked_dict[k]) == 0:
                checked_dict[k] = temp_dict[k]
            else:
                aaa = set(checked_dict[k]) & set(temp_dict[k])
                if aaa != set():
                    checked_dict[k] = list(aaa)

    where = x_pop[1]

    for j in ab_count[x]:
        if len(checked_dict[j]) == 0:
            #OK,temp_dictに入れて、queに入れる。
            temp_dict[j].append(x)
            que.append([j,where+1])
        else:
            continue

    

print("Yes")
for i in range(2,n+1):
    print(checked_dict[i][0])



### FIXED CODE ###

from collections import deque


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

ab_list = [list(map(int,input().split())) for _ in range(m)]

ab_count = {key:[] for key in range(1,n+1)}

for i in range(m):
    ab_count[ab_list[i][0]].append(ab_list[i][1])
    ab_count[ab_list[i][1]].append(ab_list[i][0])


#print(ab_count)

que = deque()

#始点は1、階層は0からスタート
que.append([1,0])

checked_dict = {key:[] for key in range(1,n+1)}
#temp_dict = {key:[] for key in range(1,n+1)}
where = 0

while que:
    x_pop = que.popleft()
    x = x_pop[0]
    if where != x_pop[1]:
        pass
        ##階層が代わったから、temp_dictをchecked_dictへ反映させる処理
        #for k in range(1,n+1):
        #    if len(checked_dict[k]) == 0:
        #        checked_dict[k] = temp_dict[k]
        #    else:
        #        aaa = set(checked_dict[k]) & set(temp_dict[k])
        #        if aaa != set():
        #            checked_dict[k] = list(aaa)

    where = x_pop[1]

    for j in ab_count[x]:
        if len(checked_dict[j]) == 0:
            #OK,temp_dictに入れて、queに入れる。
            #temp_dict[j].append(x)
            checked_dict[j].append(x)
            que.append([j,where+1])
        else:
            continue

    

print("Yes")
for i in range(2,n+1):
    print(checked_dict[i][0])
a, b, k = map(int, input().split())
r = range(a,b+1)
l = list(r)
ans = sorted(set(l[:k] + l[len(l)-k:]))

print(*ans, sep = "\n", end = "")

### FIXED CODE ###

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

l = [i for i in range(a, b+1) if (i < a+k) or (i > b-k)]

print(*l, sep="\n", end="")
if sum(map(int,input().split())<22:
 print("win")
else print("bust")


### FIXED CODE ###

print('bust'if sum(map(int,input().split()))>=22else 'win')
s=[int(0) for i in range(26)]
x=input()
while x:
    for i in range(len(list(x))):
        if 97<=ord(list(x)[i].lower())<=122:
            s[ord(list(x)[i].lower())-97]=s[ord(list(x)[i].lower())-97]+1
    x=input()
for i in range(26):
    print(chr(97+i),":",s[i])

### FIXED CODE ###

s=[int(0) for i in range(26)]
while True:
    try:
        x=input()
        for i in range(len(list(x))):
            if 97<=ord(list(x)[i].lower())<=122:
                s[ord(list(x)[i].lower())-97]=s[ord(list(x)[i].lower())-97]+1
    except EOFError:
        break
for i in range(26):
    print(chr(97+i),":",s[i])
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


N, M = map(int, input().split())
uf = UnionFind(N)

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

#AB = [tuple(map(int, input().split())) for i in range(M)]

#丸暗記。隣接リストの初期化
graph = [[] for _ in range(N)]

for _ in range(M):
  a, b = map(int, input().split())
  uf.union(a, b)

print(uf.group_count()-1)



### FIXED CODE ###

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


N, M = map(int, input().split())
uf = UnionFind(N)

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

#AB = [tuple(map(int, input().split())) for i in range(M)]

#丸暗記。隣接リストの初期化
graph = [[] for _ in range(N)]

for _ in range(M):
  a, b = map(int, input().split())
  uf.union(a-1, b-1)

print(uf.group_count()-1)
from functools import lru_cache

H,N = map(int,input().split())
atk=[]
MP=[]
for i in range(N):
  n,a=input().split()
  atk.append(int(n))
  MP.append(int(a))

@lru_cache(maxsize=1000)
def fx(H):
  if H <= 0:
    return 0
  arr = []
  for i in range(len(atk)):
    b = fx(H - atk[i]) + MP[i]
    arr.append(b)   
  return min(arr)

a = fx(H)
print(a)


### FIXED CODE ###

def knapsack(N,W,weight,value):
  #初期化
  inf=float("inf")
  dp=[[inf for i in range(W+1)] for j in range(N+1)]
  dp[0][0]= 0
  #DP
  for i in range(N):
    for w in range(W+1):
      if 0 <= w-weight[i]: #dp[i][w-weight[i]の状態にi番目の荷物が入る可能性がある
        dp[i+1][w]=min(dp[i+1][w-weight[i]]+value[i], dp[i][w])
      else:
        dp[i+1][w]=dp[i][w]
  return dp
 
H,N = map(int,input().split())
 
weight=[]
value=[]
for i in range(N):
    n,a=input().split()
    weight.append(int(n))
    value.append(int(a))
MAX = max(weight)
dp = knapsack(N,H+MAX,weight,value)
 
print(min(dp[N][H:H+MAX]))
N,R=int(input().split())
ans=0
if N>=10:
  ans=R
  
else:
  ans=R-100*(10-N)
 
print(ans)

### FIXED CODE ###

N,R=map(int,input().split())
ans=0
if N>=10:
  ans=R
  
else:
  ans=R+100*(10-N)
 
print(ans)
#!/usr/bin/env python3
n, a, b = map(int, input().split())
ans = ""
s = "b" * a
t = "r" * b
while(True):
    if len(ans) <= n:
        ans += s
        if len(ans) <= n:
            ans += t
        else:
            print(ans[:n].count("b"))
            break
    else:
        print(ans.count("b"))
        break


### FIXED CODE ###

#!/usr/bin/env python3
n, a, b = map(int, input().split())
x = n // (a + b)
r = n % (a + b)
print(a * x + r) if r < a else print((a * (x + 1)))
import math

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


A,B,C,D = map(int,input().split())
E = lcm(C,D)
c = (A-1)//C + 1 if C!=1 else A
d = (A-1)//D + 1 if D!=1 else A
e = (A-1)//E + 1 if E!=1 else A
cde = [[c,C], [d,D], [e,E]]
cnt_cde = []
for x,y in cde:
    if x*y < B:
        cnt_cde.append((B-x*y)//y+1)
    elif x*y == B:
        cnt_cde.append(1)
    else :
        cnt_cde.append(0)
answer = B-A+1-(cnt_cde[0]+cnt_cde[1]-cnt_cde[2])
print(answer)
            

### FIXED CODE ###

import fractions
A,B,C,D = map(int,input().split())
c = B//C - (A-1)//C
d = B//D - (A-1)//D
E = (C*D)//fractions.gcd(C,D)
e = B//E - (A-1)//E
answer = B-A+1-(c+d-e)
print(answer)
import pandas as pd
import numpy as np
n,m,x=map(int,input().split())
zen=np.array(list(map(int,input().split()) for _ in range(n)))
a=pd.Series(zen.sum(1))
df=pd.DataFrame(zen)
df=df.join(a)
df=df.sort_values(a)

p=df.iloc[-1]
df=df.drop(df.index[[-1]])
while all(p[1:]>=x):
  p+=df.iloc[-1]
print(p[0].sum())
  


### FIXED CODE ###

n,m,x=map(int,input().split())
clis=[]
alis=[]
for _ in range(n):
  tu=list(map(int,input().split()))
  clis.append(tu[0])
  alis.append(tu[1:])


ma_c=[]
for i in range(2**n):
  bag=[]
  price=0
  for j in range(n):
    if ((i>>j)&1):
      price+=clis[j]
      bag.append(alis[j])
  pac=[0]*m
  for t in range(len(bag)):
    for k in range(m):
        pac[k]+=bag[t][k]
  if all([pac[t]>=x for t in range(m)]):
    ma_c.append(price)


if len(ma_c)!=0:
  print(min(ma_c))
else:
  print(-1)
n = int(input())
s = [str(input()) for _ in range(n)]
t = []
ans = 0
for i in range(n):
    s[i] = sorted(s[i])

t = set(s)
ans = len(s) - len(t)


print(ans)


### FIXED CODE ###

n = int(input())
s = [input() for _ in range(n)]
for i in range(n):
  s[i] = ''.join(sorted(s[i]))
t = {}
for i in range(n):
  if s[i] in t:
    t[s[i]] += 1
  else:
    t[s[i]] = 1
print(sum(t[k] * (t[k] -1) // 2 for k in t))
import math
from functools import reduce
from fraction import gcd
import sys


def gcd(*numbers):
    return reduce(gcd,numbers)

n, x = list(map(lambda x : int(x),input().split()))

zahyo = list(map(lambda x : int(x),input().split()))

zahyo.append(x)
zahyo.sort()

min = zahyo[1] - zahyo[0]

is_odd = False
is_even = False

odds = list()

for i in range(n):
    diff = zahyo[i+1] - zahyo[i]

    if diff % 2 == 0:
        is_even == True
    else:
        is_odd = True
        odds.append(diff)

    if diff < min:
        min = zahyo[i+1] - zahyo[i]

# print(is_odd)
# print(is_even)
if is_odd == True and is_even == True or gcd(*odds) == 1:
    print(1)
    sys.exit()

# print(gcd(*odds))

print(min)


### FIXED CODE ###

import math
from functools import reduce
import fractions
import sys


def gcd(*numbers):
    return reduce(fractions.gcd,numbers)


n, x = list(map(lambda x : int(x),input().split()))

zahyo = list(map(lambda x : int(x),input().split()))

zahyo.append(x)
zahyo.sort()

min = zahyo[1] - zahyo[0]

is_odd = False
is_even = False

odds = list()

for i in range(n):
    diff = zahyo[i+1] - zahyo[i]

    if diff % 2 == 0:
        is_even == True
    else:
        is_odd = True
        odds.append(diff)

    if diff < min:
        min = zahyo[i+1] - zahyo[i]

# print(is_odd)
# print(is_even)
if is_odd == True and is_even == True:
    print(1)
    sys.exit()

elif is_odd == True:
    print(gcd(*odds))
else:

    print(min)
S = input()
T = input()
i = 1
for j in range(3):
    if S[j] == T[J]:
        i += 1
print(i)


### FIXED CODE ###

S = input()
T = input()
i = 0
for j in range(3):
    if S[j] == T[j]:
        i += 1
print(i)
#coding:utf-8
n = int(input())

#全探索
for i in range(n//7):
    for j in range(n//4):
        if 7*i + 4*j == n:
            print('Yes')
            exit()

print('No')


### FIXED CODE ###

#coding:utf-8
n, k = map(int, input().split())
#公平に配れるか1枚余るかどっちか

if n % k == 0:
    print(0)
else:
    print(1)
import math
r = int(input())
print(2*math.PI*r)

### FIXED CODE ###

import math
r = int(input())
print(2*math.pi*r)
# ABC129 C

MOD = 10**9 + 7
n, m = map(int, input().split())
a_l = [int(input()) for _ in range(m)]

dp = [0] * (n+1)
dp[0] = 1
k = 0
if m > 0 and a_l[0] == 1:
    k += 1
else:
    dp[1] = 1

for i in range(2, n+1):
    if m > 0 and i == a_l[k]:
        k = min(k+1, m-1)
        continue
    dp[i] = (dp[i-1] + dp[i-2]) % MOD
    
print(dp[n])

### FIXED CODE ###

# ABC129 C

MOD = 10**9 + 7
n, m = map(int, input().split())
a_l = [int(input()) for _ in range(m)]

dp = [0] * (n+1)
dp[0] = 1
k = 0
if m > 0 and a_l[0] == 1:
    k = min(k+1, m-1)
else:
    dp[1] = 1

for i in range(2, n+1):
    if m > 0 and i == a_l[k]:
        k = min(k+1, m-1)
        continue
    dp[i] = (dp[i-1] + dp[i-2]) % MOD
    
print(dp[n])
N,K=map(int,input().split())
A=list(map(int,input().split()))
B=[1]
C=["#"]*N
for i in range(K):
    if C[B[i]-1]=="#":
        C[B[i]-1]="$"
    else:
        break
    B.append(A[B[i]-1])

f=B.index(B[i])
T=i-f
r=(K-f)%T
print(B[f+r])


### FIXED CODE ###

N,K=map(int,input().split())
A=list(map(int,input().split()))
B=[1]
C=["#"]*N
roop=False
for i in range(K):
    if C[B[i]-1]=="#":
        C[B[i]-1]="$"
    else:
        roop=True
        break
    B.append(A[B[i]-1])
if roop==True:
    f=B.index(B[i])
    T=i-f
    if T==0:
        print(B[f])
    else:
        r=(K-f)%T
        print(B[f+r])
else:
    print(B[K])
N, P = [int(i) for i in input().strip().split()]
dic={}

import numpy as np

def seachPrimeNum(N):
    max = int(np.sqrt(N))
    seachList = [i for i in range(2,N+1)]
    primeNum = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum

for i in seachPrimeNum(P):
    num = 0
    while P%i == 0:
        num = num +1
        P = P/i
        dic[i] = num
        
ans = 1
for i in dic:
    if N == 1:
        ans = P
        break
    elif dic[i] != 0:
        ans = ans*(i**(dic[i]//N))
print(ans)

### FIXED CODE ###

N, P = [int(i) for i in input().strip().split()]
dic={}
ans = 1

if N == 1:
    print(P)
    quit()
elif P == 1:
    print(1)
    quit()
    
for i in range(2,int(P**(1/2))+1):
    num = 0
    while P%i == 0:
        num = num +1
        P = int(P/i)
    dic[i] = num//N
    ans = ans*(i**(dic[i]))

print(ans)
2 100

### FIXED CODE ###

X, Y = map(int, input().split())
for i in range(X+1):
    if 2 * i + 4 * (X - i) == Y:
        print('Yes')
        exit()
print('No')
sample = input()
sample_list = sample.split(" ")
count = 0
flag = 0
for i in range(len(sample_list)):
  for j in range(1, i):
    if L1[i] == L1[j]:
      flag = 1
    if flag == 0:
      count += 1
    flag = 0
  return count

### FIXED CODE ###

sample = input()
sample_list = sample.split(" ")
count = 0
flag = 0
i = 0
j = 1
for i in range(len(sample_list)):
  for j in range(i):
    if sample_list[i] == sample_list[j]:
      flag = 1
  if flag == 0:
    count += 1
  flag = 0
print(count)