Harryxun/stf_run huggingface dataset:
N,M=map(int,input().split())
a=[]
b=[]
for i in range(0,M):
	c,d=map(int,input().split())
	a.append(c)
	b.append(d)

pos=0
i=0
g=[0 for i in range(0,M)]
print(g)
e=[]
f=[]
k=0
l=0
while i < M and pos == 0:
	if a[i] == 1:
		g[b[i]] = 1
	if b[i] == 1:
		g[a[i]] = 1
	i=i+1
i=0
print(g)
while i < M and pos == 0:
	if a[i] == N:
		if g[b[i]] == 1:
			pos=1
	if b[i] == N:
		if g[a[i]] == 1:
			pos=1
	i = i + 1
if pos == 1:
	print("POSSIBLE")
else:
	print("IMPOSSIBLE")

### FIXED CODE ###

N,M=map(int,input().split())
a=[]
b=[]
for i in range(0,M):
	c,d=map(int,input().split())
	a.append(c)
	b.append(d)

pos=0
i=0
g=[0 for i in range(0,200000)]
e=[]
f=[]
k=0
l=0
while i < M and pos == 0:
	if a[i] == 1:
		g[b[i]] = 1
	if b[i] == 1:
		g[a[i]] = 1
	i=i+1
i=0
while i < M and pos == 0:
	if a[i] == N:
		if g[b[i]] == 1:
			pos=1
	if b[i] == N:
		if g[a[i]] == 1:
			pos=1
	i = i + 1
if pos == 1:
	print("POSSIBLE")
else:
	print("IMPOSSIBLE")
import sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    N, K = LI()
    A = LI()

    # 端っこだけ1の最遅ケースでもn**2オーダーで収束する
    for _ in range(min(K, N ** 0.5)):
        tmp = [0] * (N + 1)
        b = [0] * (N + 1)
        for i in range(N):
            tmp[max(i - A[i], 0)] += 1
            tmp[min(i + A[i] + 1, N)] -= 1
        for i in range(N):
            b[i+1] = tmp[i] + b[i]
        for i in range(N):
            A[i] = b[i+1] 

    print(*A)

if __name__ == '__main__':
    resolve()


### FIXED CODE ###

import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    N, K = LI()
    A = LI()

    # 全部0の最遅ケースでもlog(N)*2くらいで収束する log(2*10**5)<50
    for _ in range(min(K, 50)):
        tmp = [0] * (N + 1)
        b = [0] * (N + 1)
        for i in range(N):
            tmp[max(i - A[i], 0)] += 1
            tmp[min(i + A[i] + 1, N)] -= 1
        for i in range(N):
            b[i+1] = tmp[i] + b[i]
        for i in range(N):
            A[i] = b[i+1] 
        # print(A)

    print(*A)

if __name__ == '__main__':
    resolve()
A, B, K = list(map(int, input().split()))

S = [1]

for i in range(2,min(A,B)):
    if A % i == 0 or B % i == 0:
        S.append(i)

print(S[K-1])

### FIXED CODE ###

A, B, K = list(map(int, input().split()))

S = [1]

for i in range(2,min(A+1,B+1)):
    if A % i == 0 and B % i == 0:
        S.append(i)

S.sort(reverse=True)

print(S[K-1])
# -*- coding: utf-8 -*-
# 整数の入力
a = int(input())
b = int(input())

# 奇数か偶数の判断
if (a * b) % 2 == 0:
    print('Even')
else:
    print('Odd')

### FIXED CODE ###

# -*- coding: utf-8 -*-
# 整数の入力
a = list(map(int, input().split()))

# 奇数か偶数の判断
if (a[0] * a[1])%2 == 0:
    print('Even')
else:
    print('Odd')
a = int(input())
b = int(input())

print(set([1,2,3]) - a - b)

### FIXED CODE ###

a = int(input())
b = int(input())

l = [1,2,3]
l.remove(a)
l.remove(b)

print(l[0])
s=input()
a=""
ans=0
i=0
while i<len(s):
    if s[i]==a:
        i+=2
        ans+=1
        a=""
    else:
        i+=1
        ans+=1
        a=s[i]
print(ans)

### FIXED CODE ###

s=input()
n=len(s)
dp=[[0]*2 for _ in range(n)]
dp[0]=[1,0]
# dp[1]=
for i in range(n):
    if i+1<n:
        dp[i+1][0]=max(dp[i+1][1],dp[i][1]+1)
        if s[i]!=s[i+1]:
            dp[i+1][0]=max(dp[i+1][0],dp[i][0]+1)
    if i+2<n:    
        dp[i+2][1]=max(dp[i+2][0],dp[i][0]+1)
        if s[i-1:i+1]!=s[i+1:i+3]:
            dp[i+2][1]=max(dp[i+2][1],dp[i][1]+1)
print(max(dp[-1]))
while True:
    data = input()
    if(data == "-"):break
    m = int(input())
    tmp = []
    flag = False
    for i in range(m):
        num = int(input())
        if(!flag):
            tmp = data[num:] + data[:num]  
            flag = True
            data = ""
        else:
            data = tmp[num:] + tmp[:num]
            flag = False
            tmp = ""


### FIXED CODE ###

while True:
    data = input()
    if(data == "-"):break
    m = int(input())
    tmp = []

    for i in range(m):
        num = int(input())
        if(len(tmp) == 0):
            tmp = data[num:] + data[:num]
            data = ""
        else:
            data = tmp[num:] + tmp[:num]
            tmp = ""
    if(data): print(data)
    else: print(tmp)
s=input()
a=0
for i in s:
  if i in "ATGC" :
    a+=1
  else:
    b=a
    a=0
print(max(a,b))

### FIXED CODE ###

s=input()
a=0
b=0
for i in s:
  if i in "ATGC" :
    a+=1
  else:
    b=max(a,b)
    a=0
print(max(a,b))
import math
S = int(input())

if int(math.sqrt(S))**2 == S:
    a = d = int(math.sqrt(S))
else:    
    a = d = int(math.sqrt(S)) + 1

bc = a*d - S

for i in range(int(math.sqrt(bc)),0,-1):
    if bc % i == 0:
        b = i
        c = bc//i
        break

print(0,0,a,b,c,d)

### FIXED CODE ###

import math
S = int(input())

if int(math.sqrt(S))**2 == S:
    a = d = int(math.sqrt(S))
else:
    a = d = int(math.sqrt(S)) + 1

bc = a*d - S

if bc == 0:
    b = c = 0
else:
    for i in range(int(math.sqrt(bc)),0,-1):
        if bc % i == 0:
            b = i
            c = bc//i
            break

print(0,0,a,b,c,d)
def fa(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr




n=int(input())
if n==1:
  print(0)
  exit()
A=fa(n)
ans=0
for i in range(len(A)):
  x=int(2*A[i][1]**(0.5))
  if (x-2)*(x-1)<=2*A[i][1]<x*(x-1):
    a=x-2
  if (x-1)*x<=2*A[i][1]<x*(x+1):
    a=x-1
  if (x+1)*x<=2*A[i][1]<(x+2)*(x+1):
    a=x
  if (x+1)*(x+2)<=2*A[i][1]<(x+2)*(x+3):
    a=x+1
  if (x+3)*(x+2)<=2*A[i][1]<(x+4)*(x+3):
    a=x+2
  ans=ans+a
print(a)

### FIXED CODE ###

def fa(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr




n=int(input())
if n==1:
  print(0)
  exit()
A=fa(n)
ans=0
for i in range(len(A)):
  x=int((2*A[i][1])**(0.5))
  if (x-2)*(x-1)<=2*A[i][1]<x*(x-1):
    a=x-2
  if (x-1)*x<=2*A[i][1]<x*(x+1):
    a=x-1
  if (x+1)*x<=2*A[i][1]<(x+2)*(x+1):
    a=x
  if (x+1)*(x+2)<=2*A[i][1]<(x+2)*(x+3):
    a=x+1
  if (x+3)*(x+2)<=2*A[i][1]<(x+4)*(x+3):
    a=x+2
  ans=ans+a
print(ans)
while 1 :
  m, f, r = [int(i) for i in raw_input().split()]
	if m == -1 and f == -1 and r == -1 :
		break
	 elif m == -1 or f == -1:
        print 'F'
   elif m + f >= 80:
       print 'A'
   elif m + f >= 65:
       print 'B'
   elif m + f >= 50:
        print 'C'
   elif m + f >= 30:
       if r >= 50:
           print 'C'
       else:
          print 'D'
	  else:
       print 'F'

### FIXED CODE ###

while 1 :
	m,f,r = map(int , raw_input().split())
	
	s = m + f
	
	if m == f == r == -1 :
		break
	elif m == -1 or f == -1 or s < 30 :
		print "F"
	elif s >= 80 :
		print "A"
	elif s >= 65 :	
		print "B"
	elif s >= 50 : 
		print "C"
	elif s >= 30 and r >= 50 :
		print "C"
	else :
		print "D"
'''input
4
10 30 40 20
'''

n=int(input())
arr=list(map(int,input().split()))
dp=[0]*len(arr)
dp[0]=0
for i in range(len(arr)):
    if(i==1):
        dp[i]=dp[i-1]+abs(arr[i]-arr[i+1])
    else:
        dp[i]=min(dp[i-1]+abs(arr[i]-arr[i-1]),dp[i-2]+abs(arr[i]-arr[i-2]))
print(dp[n-1])

### FIXED CODE ###

'''input
4
10 30 40 20
'''

n=int(input())
arr=list(map(int,input().split()))
dp=[0]*len(arr)
for i in range(1,n):
	dp[i]=dp[i-1]+abs(arr[i]-arr[i-1])
	if(i>1):
		a=dp[i-2]+abs(arr[i]-arr[i-2])
		dp[i]=min(dp[i],a)
print(dp[n-1])
N,M,X,Y=map(int,input().split())
ListX = list(map(int, input().split()))
ListY = list(map(int, input().split()))
ListX.sort()
ListX.sort()
threX = max(X,List[N-1])
threY = min(Y,List[0])
Z = threX+1
if threY >= Z:
  print("No War")
else:
  print("War")
  

### FIXED CODE ###

N,M,X,Y=map(int,input().split())
ListX = list(map(int, input().split()))
ListY = list(map(int, input().split()))
ListX.sort()
ListY.sort()
threX = max(X,ListX[N-1])
threY = min(Y,ListY[0])
Z = threX+1
if threY >= Z:
  print("No War")
else:
  print("War")
N = int(input())

for i in range(1, 10):
    if N % i == 0 and N / i <= 9:
        print('Yes')
        exit(0)
print('No')


### FIXED CODE ###

A, B = map(int, input().split())

if 1 <= A <= 9 and 1 <= B <= 9:
    print(A*B)
else:
    print('-1')
r = int(input())
import math
print(math.pi * R * 2)

### FIXED CODE ###

r = int(input())
import math
print(math.pi * r * 2)
N,P=map(int,input().split())
i=2
ans=1
while P!=1:
    if P%(i**N)==0:
        ans*=i
        P//=i**N
    elif P%i==0:
        P//=i
    else:
        i+=1
print(ans)

### FIXED CODE ###

n,p = map(int,input().split())
 
def pfact(m):
	pf = {}
	for i in range(2,int(m**0.5)+1):
		while m%i == 0:
			pf[i] = pf.get(i,0) + 1
			m //= i
	if m>1 : pf[m]=1
	return pf
 
ans = 1
for i, j in pfact(p).items():
	ans *= i**(j//n)
print(ans)
N,Y=map(int,input().split())
for x in range(N+1):
    for y in range(N+1):
        z=N-x-y
        if x+y+z==N and 10000*x+5000*y+1000*z==Y:
            print(x,y,z)
            exit()

print(-1,-1,-1,sep=" ")


### FIXED CODE ###

S=list(input())
S[3]="8"
print(*S,sep="")
a= input()
b= input()

if (int(a) >= 3200)
b = 'red'

print(b)

### FIXED CODE ###

a= input()
b= input()

if (int(a) < 3200):
    b = 'red'

print(b)
import collections

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

hantei = 0

for i in range(1,n):
    if u[0] != u[i]:
        hantei = 1
        break

if hantei == 0:
    print(n // 2)
else:
   u1 = [] 
   u2 = [] 
   ans = 0
   for j in range(n):
       if j % 2 == 0:
           u2.append(u[j])
       else:
   u1_list =collections.Counter(u1)
   u2_list =collections.Counter(u2)
   values1, counts1 = u1_list.most_common()[0]
   values2, counts2 = u2_list.most_common()[0]
   ans += n // 2 - counts1
   ans += n // 2 - counts2
   print(ans)

### FIXED CODE ###

import collections

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

hantei = 0

for i in range(0,n):
    if u[0] != u[i]:
        hantei = 1
        break

if hantei == 0:
    print(n // 2)
else:
   u1 = [] 
   u2 = [] 
   ans = 0
   for j in range(n):
       if j % 2 == 0:
           u2.append(u[j])
       else:
           u1.append(u[j])
   u1_list =collections.Counter(u1)
   u2_list =collections.Counter(u2)
   values1, counts1 = u1_list.most_common()[0]
   values2, counts2 = u2_list.most_common()[0]
   if values1 != values2:
       ans += n // 2 - counts1
       ans += n // 2 - counts2
   else:
       if len(u1_list) > 1 and len(u2_list) > 1:
           values3, counts3 = u1_list.most_common()[1]
           values4, counts4 = u2_list.most_common()[1]
           ans1 = n - counts1 - counts4
           ans2 = n - counts2 - counts3
           ans = max(ans1,ans2)
       elif len(u1_list) > 1 and len(u2_list) < 2:
           values3, counts3 = u1_list.most_common()[1]
           ans = n - counts2 - counts3
       elif len(u1_list) < 2 and len(u2_list) > 1:
           values3, counts3 = u2_list.most_common()[1]
           ans = n - counts1 - counts3

       ans = min(ans1,ans2)
   print(ans)
import sys
import numpy as np

def main():
    input = sys.stdin.readline
    abx = list(map(int, input().split()))
    a = abx[0]
    b = abx[1]
    x = abx[2]
    taiseki = a * a * b
    if x <= taiseki / 2:
        y = (2 * x) / (a * b)
        tan = y / b
        theta = 90 - np.rad2deg(np.arctan(tan))
    else:
        y = (2 * x) / (a * a) - b
        tan = a / (b - y)
        theta = 90 - np.rad2deg(np.arctan(tan))

    print(theta)

if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
import numpy as np

def main():
    input = sys.stdin.readline
    abx = list(map(np.float64, input().split()))
    a = abx[0]
    b = abx[1]
    x = abx[2]
    taiseki = a * a * b
    if x <= taiseki / 2:
        y = (2 * x) / (a * b)
        tan = y / b
        theta = np.float64(np.float64(90) - np.rad2deg(np.arctan(tan)))
    else:
        y = (2 * x) / (a * a) - b
        if b - y != 0:
            tan = a / (b - y)
            theta = np.float64(np.float64(90) - np.rad2deg(np.arctan(tan)))
        else:
            theta = 0.


    print(theta)

if __name__ == '__main__':
    main()
N = int(input())
S = input()
K =  int(input())

moji = S[K]

result = ''
for s in S:
    if s == moji:
        result+=s
    else:
        result+='*'
print(result)

### FIXED CODE ###



N = int(input())
S = input()
K =  int(input())

moji = S[K-1]

result = ''
for s in S:
    if s == moji:
        result+=s
    else:
        result+='*'
print(result)
from typing import List
import math


class Solution:
    def solve(self, n: int, points: List[List[int]]) -> int:

        s = 0.

        for i in range(n):
            p = points[i]
            for j in range(i+1, n):
                q = points[j]
                s += math.sqrt((p[0]-q[0])**2 + (p[1] - q[1])**2)

        return 2 * s / n


if __name__ == '__main__':

    # standard input
    n = int(input())
    points = []

    for i in range(n):
        x, y = map(int, input().split())
        points.append([x, y])

    # solve
    solution = Solution()
    print(solution.solve(n, points))


### FIXED CODE ###

import math


class Solution:
    def solve(self, n: int, points: list) -> int:

        s = 0.

        for i in range(n):
            p = points[i]
            for j in range(i+1, n):
                q = points[j]
                s += math.sqrt((p[0]-q[0])**2 + (p[1] - q[1])**2)

        return 2 * s / n


if __name__ == '__main__':

    # standard input
    n = int(input())
    points = []

    for i in range(n):
        x, y = map(int, input().split())
        points.append([x, y])

    # solve
    solution = Solution()
    print(solution.solve(n, points))
c=[]
for _ in range(3):
  c.append( list(map(int,input().split())))

ans = "Yes"
a=[c[0][0],c[1][0],c[2][0]]
b=[c[0][0]-a[0],c[0][1]-a[0],c[0][2]-a[0]]
for i in range(3):
    for j in range(3):
        if c[i][j] != a[i]+b[j]:
            ans = "No"
print(ans)

### FIXED CODE ###

N = int(input())
A = int(input())

if N % 500 <= A:
  print('Yes')
else:
  print('No')
n = input()
l = input().split()
data = []
for i in range(int(min(l)), int(max(l))):
    sum_l = 0
    for j in range(len(l)):
        sum_l = sum_l + (int(l[j])-i)**2
    data.append(sum_l)

print(min(data))

### FIXED CODE ###

n = input()
l = input().split()
data = []
for i in range(int(min(l)), int(max(l))+1):
    sum_l = 0
    for j in range(len(l)):
        sum_l = sum_l + (int(l[j])-i)**2
    data.append(sum_l)

print(min(data))
import math

A,B,K=map(int,input().split())
gcd=math.gcd(A,B)
#print(gcd)
l=[]
for i in range(1,gcd+1):
    if gcd%i==0:
        l.append(i)
print(l)
print(l[len(l)-K])

### FIXED CODE ###

import fractions

A,B,K=map(int,input().split())
gcd=fractions.gcd(A,B)
#print(gcd)
l=[]
for i in range(1,gcd+1):
    if gcd%i==0:
        l.append(i)
#print(l)
print(l[len(l)-K])
import itertools
x = int(input())
num = [i**5 for i in range(3000)]
ans= list(itertools.combinations_with_replacement(num, 2))
for i in ans:
    if abs(i[0]-i[1]) == x:
        if i[0] < i[1]:
            print(int(i[1]**0.2),int(i[0]**0.2)*)
        else:
            print(int(i[0]**0.2),int(i[1]**0.2))
        break
    elif i[0]+i[1] == x:
        print(int(i[0]**0.2),int(i[1]**0.2)*-1)
        break


### FIXED CODE ###

import itertools
x = int(input())
num = [i**5 for i in range(3000)]
ans= list(itertools.combinations_with_replacement(num, 2))
for i in ans:
    if abs(i[0]-i[1]) == x:
        if i[0] < i[1]:
            print(int(i[1]**0.2),int(i[0]**0.2))
        else:
            print(int(i[0]**0.2),int(i[1]**0.2))
        break
    elif i[0]+i[1] == x:
        print(int(i[0]**0.2),int(i[1]**0.2)*-1)
        break
#coding:utf-8
n1=input()
n2=input()
if(n1[0]==n2[2] & n1[2]==n2[0]):
  print("YES")
else:print("NO")

### FIXED CODE ###

#coding:utf-8
n1=str(input())
n2=str(input())
if(n1[0]==n2[2] and n1[2]==n2[0]):
  if(n1[1]==n2[1]):
    print("YES")
  else:
    print("NO")
else:print("NO")
s == int(input())
w == int(input())

if s<=w:
  print('unsafe')
else:
  print('safe')

### FIXED CODE ###

s,w = map(int,input().split())

if s<=w:
  print('unsafe')
else:
  print('safe')
for i in range(5):
  a=int(input())
  b=int(input())
  c=int(input())
  d=int(input())
  e=int(input())
  if a<0:
    x=abs(a)*c+d+b*e
    print(x)
  elif a>=0:
    y=(b-a)*e
    print(y)
  else:
    pass


### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
if a<0:
  x=-a*c+d+b*e
  print(x)
else :
  y=(b-a)*e
  print(y)
N = int(input())
A = map(int, input().split())
Q = int(input())

val = []
heavy = []

for x in A:
    if x in heavy:
        val[heavy.index(x)] += 1
    else:
        heavy.append(x)
        val.append(1)

for i in range(Q):
    B, C = input().split()
    B = int(B)
    C = int(C)
    if C not in heavy:
        heavy.append(C)
        val.append(0)
    val[heavy.index(C)] += val[heavy.index(B)]
    val[heavy.index(B)] = 0
    sum = 0
    for x, y in zip(val, heavy):
        sum += x * y
    print(sum)


### FIXED CODE ###

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

heavy = [0] * (10 ** 5 + 1)
for x in A:
    heavy[x] += 1
suma = sum(A)

for i in range(Q):
    B, C = map(int, input().split())
    suma -= B * heavy[B]
    suma += C * heavy[B]
    heavy[C] += heavy[B]
    heavy[B] = 0
    print(suma)
n = int(input())
x = list(map(int, input().split()))
x.sort()
sigmaList = list()
for p in range(x[0], x[n]):
    sigma = 0
    for i in range(n):
        sigma += (x[i] - p) ** 2
    sigmaList.append(sigma)

print(min(sigmaList))


### FIXED CODE ###

n = int(input())
x = list(map(int, input().split()))
x.sort()
sigmaList = list()
for p in range(x[0], x[n - 1] + 1):
    sigma = 0
    for i in range(n):
        sigma += (x[i] - p) ** 2
    sigmaList.append(sigma)
print(min(sigmaList))
a, x = int(input().split())
print("0" if x < a else "10") 

### FIXED CODE ###

x, a = map(int, input().split())
if x < a:
  print(0)
else:
  print(10)
a, b = map(int,input().split())
if a > b:
 print 'a > b'
elif a < b:
 print 'a < b'
else:
 print 'a == b'

### FIXED CODE ###

a, b = map(int,input().split())
 
if a > b:
    print('a > b')
elif a < b:
    print('a < b')
else:
    print('a == b')
import sys
import math
import itertools
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n = ni()
a = na()

ans = a[0]

for ai in a[1:]:
    ans = math.gcd(ans, ai)
print(ans)

### FIXED CODE ###

import sys
import math
import itertools
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]
#a,bの最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


n = ni()
a = na()

ans = a[0]

for ai in a[1:]:
    ans = gcd(ans, ai)
print(ans)
n,k = map(int,input().split())
d = [0]*n
a = [0]*n
s = []
for i in range(k):
    d[i] = int(input())
    a[i] = list(map(int,input().split()))
    s.extend(a[i])
d = set(s)

print(n-len(d))

### FIXED CODE ###

n,k = map(int,input().split())
d = [0]*k
a = [0]*k
s = []
for i in range(k):
    d[i] = int(input())
    a[i] = list(map(int,input().split()))
    s.extend(a[i])
d = set(s)
print(n-len(d))
from collections import defaultdict
N = int(input())

uvw = [[int(item) for item in input().split()] for _ in range(N-1)]

d = defaultdict(lambda: {})
for u, v, w in uvw:
    d[u][v] = w
    d[v][u] = w


dist = {1: 0}


def calc_dist(i, up):
    if not(i in dist):
        dist[i] = dist[up]+d[up][i]
        [calc_dist(k, i) for k in list(d[i].keys())]


[calc_dist(k, 1) for k in list(d[1].keys())]

for i in range(1, N+1):
    if dist[i] % 2 == 0:
        print(0)
    else:
        print(1)


### FIXED CODE ###

import sys
from collections import defaultdict
N = int(input())


sys.setrecursionlimit(1000000)

uvw = [[int(item) for item in input().split()] for _ in range(N-1)]

d = defaultdict(lambda: {})
for u, v, w in uvw:
    d[u][v] = w
    d[v][u] = w


dist = {1: 0}


def calc_dist(i, up):
    if not(i in dist):
        dist[i] = dist[up]+d[up][i]
        [calc_dist(k, i) for k in list(d[i].keys())]


[calc_dist(k, 1) for k in list(d[1].keys())]

for i in range(1, N+1):
    if dist[i] % 2 == 0:
        print(0)
    else:
        print(1)
def main():
  
    a, b = map(str, input().split())
    res = int(a) * ((int(b)+0.001) * 100) // 100
    print(int(res))
 
if __name__ == '__main__':
    main()

### FIXED CODE ###

from decimal import *
def main():
    a, b = map(str, input().split())
    res = int(a) * Decimal(b)
    print(int(res))

if __name__ == '__main__':
    main()
a,b = map(int,input().split())
c = 2*b
d = a-c
if d > 0:
print(d)
elif d <= 0:
print(0)

### FIXED CODE ###

a,b = map(int,input().split())
c = 2*b
d = a-c
if d > 0:
 print(d)
elif d <= 0:
 print(0)
K = int(input())
A,B = map(int,input().split())
f = "NG"

for i in range(A, B+1):
  i % K == 0:
    f = "OK"
    
print(f)

### FIXED CODE ###

K = int(input())
A, B = map(int, input().split())
f = "NG"

for i in range(A, B + 1):
    if i % K == 0:
        f = "OK"

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

par = [i-1 for i in range(1, n+1)]

def find (x):
  if par[x] == x:
    return x
  else:
    par[x] = find(par[x])
    return par[x]

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

def unite(x,y):
  x = find(x)
  y = find(y)
  if x == y:
    return 0
  par[x] = y

for i in range(m):
  a,b = map(int, input().split())
  unite(a-1, b-1)

ans = max(par)
print(ans)

### FIXED CODE ###

d,t,s = map(int, input().split())
if d <= t*s:
  print('Yes')
else:
  print('No')
n,m=map(int,input().split())
a=n//2019
b=m//2019
if n*m%2019==0 or b-a>=1:
  print(0)
else:
  best=2018
  for c in range(n%2019,m%2019):
    for d in range(c+1,m%2019+1):
      if c*d%2019<best:
        best=c*d%2019
print(best)

### FIXED CODE ###

n,m=map(int,input().split())
a=n//2019
b=m//2019
if n*m%2019==0 or b-a>=1:
  print(0)
else:
  best=2018
  for c in range(n%2019,m%2019):
    for d in range(c+1,m%2019+1):
      if c*d%2019<best:
        best=c*d%2019
  print(best)