CodeEff/ECCO huggingface dataset:
# Original solution
D, N = list(map(int, input().split()))

if (N == 100):
    print(((N * (100 ** D)) + 100**D))
else:
    print((N * (100 ** D)))


# Optimized solution
D, N = list(map(int, input().split()))

if N == 100:
    print((100**D*N+100**D))
else:
    print((100**D*N))
# Original solution
import sys
input=sys.stdin.readline
import fractions

d,n = list(map(int, input().split()))
ans = 100**d*n
if d == 0:
    if ans == 100:
        ans += 1
elif d == 1:
    if ans == 10000:
        ans += 100
elif d == 2:
    if ans == 1000000:
        ans += 10000

print(ans)


# Optimized solution
import sys
input=sys.stdin.readline

d,n = list(map(int, input().split()))
if n == 100:
    n += 1
print((100**d*n))
# Original solution
d,n = list(map(int, input().split()))
if d==0:
    if n!=100:
        print((1*n))
    else:
        print((101))
else:
    if n!=100:
        print((100**d*n))
    else:
        print((100**d*n+100**d))

# Optimized solution
d, n = list(map(int, input().split()))

if n == 100:
  n = 101
print((str(n) + ('00' * d)))
# Original solution
d, n = list(map(int, input().split()))
i = 0
j = 1
ans = 0
while i < n:
    if j%(100**d) == 0 and j%(100**(d+1)) != 0:
        i +=1
        ans = j
    j +=1
print(ans)

# Optimized solution
d, n = list(map(int, input().split()))
if n != 100:
    print((n*100**d))
else:
    print(((n+1)*100**d))
# Original solution
d, n = list(map(int, input().split()))
if n != 100:
    print((n*100**d))
else:
    print(((n+1)*100** d))


# Optimized solution
d, n= list(map(int, input().split()))
if n != 100:
    print((100**d*n))
else:
    print((100**d*101))
# Original solution
d,n = list(map(int, input().split()))

if n == 100: print((100**d*101))
else: print((100**d*n))

# Optimized solution
d,n = list(map(int, input().split()))

if d == 0:
  if n == 100: print((101))
  else: print(n)
elif d == 1:
  if n == 100: print((n*100+100))
  else: print((n*100))
else:
  if n == 100: print((n*(100**2)+10000))
  else: print((n*(100**2)))
# Original solution
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


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


def func(x):
    cnt = 0
    while x % 100 == 0:
        cnt += 1
        x /= 100
    return cnt == d


a = []

for i in range(1, 10000000):
    if func(i):
        a.append(i)
print((a[n-1]))


# Optimized solution
import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys
import fractions


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
d, n = list(map(int, input().split()))
if d == 0:
    cnt = 0
    for i in range(10**10):
        if i % 100 != 0:
            cnt += 1
            if cnt == n:
                print(i)
                exit()
if d == 1:
    if n == 100:
        print((101*100))
        exit()
    cnt = 0
    for i in range(100, 10**12):
        if i % 100 == 0:
            cnt += 1
            if cnt == n:
                print(i)
                exit()

if d == 2:
    if n == 100:
        print((101*100*100))
        exit()
    cnt = 0
    for i in range(10000, 10**12):
        if i % 10000 == 0:
            cnt += 1
            if cnt == n:
                print(i)
                exit()
# Original solution
D, N = list(map(int, input().split()))
ans = 100 ** D
if N // 100 > 0: N += 1
print((ans * N))

# Optimized solution
D, N = list(map(int, input().split()))
if N // 100 > 0: N += 1
print((N * 100 ** D))
# Original solution
d, n = list(map(int, input().split()))
n+=(n>99)
print((n*100**d))

# Optimized solution
d,n=list(map(int,input().split()));print((100**d*n if n!=100 else 100**d*101))
# Original solution
d, n = list(map(int, input().split()))

if d == 0:
    if n <= 99:
        print(n)
    else:
        print((101))
elif d == 1:
    if n <= 99:
        print((100 * n))
    else:
        print((10100))
else:
    if n <= 99:
        print((10000 * n))
    else:
        print((1010000))

# Optimized solution
d, n = list(map(int, input().split()))

if d == 0:
    if n < 100:
        print(n)
    else:
        print((101))
elif d == 1:
    if n < 100:
        print((100 * n))
    else:
        print((10100))
else:
    if n < 100:
        print((10000 * n))
    else:
        print((1010000))
# Original solution
d,n = list(map(int,input().split()))
if n==100 and d==0:
    ans = 100**d*n+1
elif n==100 and d==1:
    ans = 100**d*n + 100
elif n==100 and d==2:
    ans = 100**d*n + 10000
else:
    ans = 100**d*n
print(ans)
    

# Optimized solution
d,n = list(map(int,input().split()))
if n==100:
    ans = 100**d*(n+1)
else:
    ans = 100**d*n
print(ans)
# Original solution
def main():
    D, N = (int(i) for i in input().split())
    ans = {0: [i for i in range(1, 100)]}
    ans[0].append(101)
    ans[1] = [100*i for i in range(1, 100)]
    ans[1].append(10100)
    ans[2] = [10000*i for i in range(1, 100)]
    ans[2].append(1010000)
    print((ans[D][N-1]))


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    D, N = (int(i) for i in input().split())
    if N == 100:
        N += 1
    print((N * 100**D))


if __name__ == '__main__':
    main()
# Original solution
def main():
    D, N = (int(i) for i in input().split())
    if N == 100:
        N += 1
    print((N * 100**D))


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    D, N = (int(i) for i in input().split())
    if N == 100:
        N += 1
    print((N*(100**D)))


if __name__ == '__main__':
    main()
# Original solution
d,n=list(map(int, input().split()))
if n == 100:
    print((101 * n**d))
else:
    print((100**d * n))

# Optimized solution
d, n = list(map(int, input().split()))
if n == 100:
    print((101*100**d))
else:
    print((100**d*n))
# Original solution
D,N = list(map(int,input().split()))
ans = (100**D) * N
if(N == 100):
    ans +=  100**D
print(ans)

# Optimized solution
d,n = list(map(int,input().split()))
ans = n * 100**d
if n == 100:
    ans += 100**d
print(ans)
# Original solution
d, n = list(map(int, input().split()))


for i in range(1, 100000000):
    if i % (100 ** d) == 0 and i % (100 * 100 ** d) != 0:
        n -= 1
    if n == 0:
        print(i)
        exit()


# Optimized solution
# Problem B - Ringo's Favorite Numbers

# input
D, N = list(map(int, input().split()))

# initialization
ans = 0
tmp = 100**D

# count
i = 1
while i<=N:
    if i==100:
        ans = tmp * (i + 1)
        break
    ans = tmp * i
    i += 1

# output
print(ans)
# Original solution
d,n =list(map(int,input().split()))
if d==0:
    if n==100:
        print((101))
    else:
        print(n)
else:
    if n==100 and d==1:
        print((100**1*100+100))
    elif n==100 and d==2:
        print((100**2*100+10000))
    else :
        print((100**d*n))

# Optimized solution
d,n =list(map(int,input().split()))
if n == 100:
    n+=1
print((100**d*n))
# Original solution
D, N = list(map(int, input().split()))

n = 100**D
count = 0
while True:
    target = n
    count_div = 0
    while True:
        if target % 100 == 0:
            count_div += 1
            target //= 100
        else:
            break
    if count_div == D:
        count += 1

    if count == N:
        print(n)
        exit()

    n += 100**D


# Optimized solution
D, N = list(map(int, input().split()))

n = 0
count = 0
while True:
    n += 100**D
    target = n
    count_div = 0
    while True:
        if target % 100 == 0:
            count_div += 1
            target //= 100
        else:
            break
    if count_div == D:
        count += 1

    if count == N:
        print(n)
        exit()
# Original solution
from itertools import *

def nth(iterable, n, default=None):
    "Returns the nth item or a default value"
    return next(islice(iterable, n, None), default)

D, N = list(map(int, input().split()))
delta = 100 ** D
ite = (x for x in count(delta, delta) if x % (delta * 100) != 0)
print((nth(ite, N - 1)))

# Optimized solution
from itertools import *
d, n = list(map(int, input().split()))
delta = 100 ** d
ite = (x for x in count(delta, delta) if x % (delta * 100) != 0)
print((list(islice(ite, n - 1, n))[0]))
# Original solution
from itertools import *
d, n = list(map(int, input().split()))
delta = 100 ** d
ite = (x * delta for x in count() if x % 100 != 0)
print((next(islice(ite, n - 1, None))))

# Optimized solution
from itertools import *
d, n = list(map(int, input().split()))
ite = (x * 100 ** d for x in count() if x % 100 != 0)
print((next(islice(ite, n - 1, None))))
# Original solution
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
D, N = list(map(int, input().split()))

l=[(100**D)*x for x in range(2*N) if (100**D)*x % (100**(D+1)) != 0]
print(l[N-1])


# Optimized solution
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
D,N = list(map(int, input().split()))
print((100**D)*(N + (1 if N==100 else 0)))
# Original solution
d, n = list(map(int, input().split()))
def division(x):
    if x % 100 != 0:
        return 0
    else:
        return division(x//100) +1
count= 0
for i in range(1, 1010001):
    if division(i) == d:
        count +=1
    if count == n:
        print(i)
        break

# Optimized solution
d, n = list(map(int, input().split()))
if d == 0:
    count = 0
    for i in range(1, 110):
        if i % 100 != 0:
            count += 1
            if count == n:
                print(i)
                break
        else:
            continue
        

if d == 1:
    count = 0
    for i in range(100, 20000, 100):
        if i % 100 == 0 and i % 10000 != 0:
            count+=1
            if count == n:
                print(i)
                break
        else:
            continue
        

if d == 2:
    count = 0
    for i in range(10000, 2000000, 10000):
        if i % 10000 == 0 and i % 1000000 != 0:
            count+=1
            if count == n:
                print(i)
                break
        else:
            continue
# Original solution
D,N=list(map(int,input().split()))
if N!=100:
    print((N*100**D))
else:
    print((101*100**D))


# Optimized solution
D,N=list(map(int,input().split()))
print(((N+N//100)*100**D))
# Original solution
def func(x):
    if(x % 100 != 0):
        return 0
    else:
        return func(x / 100) + 1

if __name__ == '__main__':
    d, n = list(map(int, input().split()))
    x = 1
    cnt = 0
    while True:
        if func(x) == d:
            cnt += 1
        if cnt == n:
            print(x)
            exit()
        x += 1

    

# Optimized solution
d, n = list(map(int, input().split()))
if n % 100 == 0:
    n += 1
print((n * 100 ** d))
# Original solution
D, N = list(map(int,input().split()))
if N != 100:
    print(((100**D)*N))
else:
    print(((100**D)*(N+1)))

# Optimized solution
D, N = list(map(int,input().split()))
if N != 100:
    print((str(N)+"0"*(D*2)))
else:
    print(((N+1)*(100**D)))
# Original solution
D,N = list(map(int,input().split()))
if N == 100:
    print((100**D*101))
else:
    print((100**D*N))


# Optimized solution
D,N = list(map(int,input().split()))

if N == 100:
  print(((100**D)*(N+1)))
else:
  print(((100**D)*N))
# Original solution
D,N = list(map(int,input().split()))
if D==0:
    if N<100:
        print(N)
    else:
        print((101))
else:
    if N<100:
        print((100**D*N))
    else:
        print((100**D*101))

# Optimized solution
D,N = list(map(int,input().split()))
if D==0 and N<=99:
    print((1+N-1))
elif D==0 and N==100:
    print((101))
elif D==1 and N<=99:
    print((100*N))
elif D==1 and N==100:
    print((10100))
elif D==2 and N<=99:
    print((10000*N))
elif D==2 and N==100:
    print((10000*101))
# Original solution
d, n = list(map(int, input().split()))
if n < 100:
    a = 10 ** (2 * d)
    b = a * n
    print(b)
if n == 100:
    a = 10 ** (2 * d)
    b = a * (n + 1)
    print(b)

# Optimized solution
d, n = list(map(int, input().split()))
ans = n * (100 ** (d))
if (ans // (100 ** d)) % 100 == 0:
    ans = (n + 1) * (100 ** (d))
print(ans)
# Original solution
# coding: utf-8
# Your code here!
d,n=list(map(int,input().split()))
if n!=100:
    print((100**d*n))
else:
    print((100**d*(n+1)))

# Optimized solution
# coding: utf-8
# Your code here!
d,n=list(map(int,input().split()))
if n==100:
    print((100**d*(n+1)))
else:
    print((100**d*n))
# Original solution
d, n = list(map(int, input().split()))
start = 100 ** d
counter = 0
while True:
    if start % (100 ** d) == 0 and start % (100 ** (d + 1)) != 0:
        counter += 1
    if counter == n:
        print(start)
        break
    start += 1


# Optimized solution
d, n = list(map(int, input().split()))
start = 100 ** d
counter = 0
while True:
    if start % (100 ** d) == 0 and start % (100 ** (d + 1)) != 0:
        counter += 1
    if counter == n:
        print(start)
        break
    start += 100 ** d
# Original solution
s = input().strip()
ss = s.split()
d = int(ss[0])
n = int(ss[1])
i = 1
while 1:
	x = i
	c = 0
	while x % 100 == 0:
		x //= 100
		c += 1
	if c == d:
		n -= 1
		if n == 0:
			print(i)
			break
	i += 1


# Optimized solution
s = input()
ss = s.split()
d = int(ss[0])
n = int(ss[1])
i = 1
while 1:
	x = i
	c = 0
	while x % 100 == 0:
		x //= 100
		c += 1
	if c == d:
		n -= 1
		if n == 0:
			print(i)
			break
	i += 1
# Original solution
D,N = list(map(int,input().split()))
if N==100: N+=1
print((N * (100**D)))

# Optimized solution
D,N = list(map(int,input().split()))
if N==100:
    N += 1
print((100**D * N))
# Original solution
D,N = list(map(int,input().split()))

list = []
for i in range(10000000):
    if i % 100**D == 0:
        list.append(i)

print((list[N]))


# Optimized solution
D,N = list(map(int,input().split()))

if N == 100:
    print((100**D*101))

else:
    print((100**D*N))
# Original solution
D, N = list(map(int,input().split()))

n = []
for i in range(1,1001):
    if D == 0:
        if i % 100 !=0:
            n.append(i)
        continue
    elif D == 1:
        if i % 100 !=0:
            n.append(100*i)
        continue      
    elif D == 2:
        if i % 100 !=0:
            n.append(10000*i)
        continue
print((n[N-1]))


# Optimized solution
D, N = list(map(int,input().split()))

n = []
for i in range(1,1001):
    if i % 100 !=0:
        if D == 0:
            n.append(i)
        elif  D == 1:
            n.append(100*i)
        elif D == 2:
            n.append(10000*i)
print((n[N-1]))
# Original solution
d, n = list(map(int,input().split()))

result = 0
for i in range(1,n+1):
  if i // 100 == 0:
    result = i*(100**d)
  else:
    j = 0
    while not(((i+j) //100 == 0)):
      j += 1

    result = (i+j)*(100**d)

print(result)


# Optimized solution
d, n = list(map(int,input().split()))

result = 0
for i in range(1,n+1):
  if i // 100 == 0:
    result = i*(100**d)
  else:  
    j = 1
    result = (i+j)*(100**d)

print(result)
# Original solution
D,N = list(map(int,input().split()))

L = []

for i in range(N*2) :
    l = 100**D
    l *= (i+1)
    if D == 0 :
        if (l % 100) != 0 :
            L.append(l)
    elif D == 1 :
        if (l % 10000) != 0 :
            L.append(l)
    else :
        if (l % 1000000) != 0 :
            L.append(l)
ans = L[N-1]
print(ans)


# Optimized solution
D,N = list(map(int,input().split()))
cnt = 0

calc = 100**D
ans = 0
while cnt != N :
    ans += calc
    
    if (ans % 100**D == 0) and (ans % 100**(D+1) != 0) :
        cnt += 1

print(ans)
# Original solution
D,N=list(map(int,input().split()))
ans=N*100**D
if N==100:
    ans+=1*100**D
print(ans)

# Optimized solution
a,b=list(map(int,input().split()))
if a==0 and b==100:
    print((101))
elif a==1 and b==100:
    print((10100))
elif a==2 and b==100:
    print((1010000))
else:
    print(((100**a)*b))
# Original solution
d,n=list(map(int,input().split()))
if n==100:
  if d==0:
    print((101))
    exit()
  elif d==1:
    print((10100))
    exit()
  else:
    print((1010000))
    exit()
print((pow(100,d)*n))

# Optimized solution
# 入力
D,N=list(map(int,input().split()))

# D（=0,1,2）の値によって場合分け
if D==0:
  if N==100:
    print((101))
  else:
    print(N)

elif D==1:
  if N==100:
    print((10100))
  else:
    print((N*100))
else:
  if N==100:
    print((1010000))
  else:
    print((N*10000))
# Original solution
d, n = list(map(int, input().split()))
if n != 100:
    print((100 ** d * n))
else:
    print((100 ** d * (n + 1)))

# Optimized solution
d, n = list(map(int, input().split()))

if n % 100 != 0:
    print((100 ** d * n))
else:
    print((100 ** d * (n + 1)))
# Original solution
D,N=list(map(int,input().split()))
if N==100:
    print((100**D*(N+1)))
else:
    print((100**D*N))

# Optimized solution
d, n = list(map(int, input().split()))
# d, n = 0, 5
# d, n = 1, 11
# d, n = 2, 85
if n != 100:
    print((100**d*n))
else:
    print((100**d*101))
# Original solution
from heapq import heappush, heappop
INF = 10 ** 20

n, m, k, s = list(map(int, input().split()))
p, q = list(map(int, input().split()))
z_dist = [INF] * n
que = []
for _ in range(k):
  c = int(eval(input())) - 1
  z_dist[c] = 0
  heappush(que, (0, c))

edges = [[] for _ in range(n)]
for _ in range(m):
  a, b = list(map(int, input().split()))
  a -= 1
  b -= 1
  edges[a].append(b)
  edges[b].append(a)

while que:
  total, node = heappop(que)
  for to in edges[node]:
    if z_dist[to] > total + 1:
      z_dist[to] = total + 1
      heappush(que, (total + 1, to))

cost = [INF] * n
cost[0] = 0
que = []
heappush(que, (0, 0))
while que:
  total, node = heappop(que)
  for to in edges[node]:
    if to == n - 1:
      if cost[to] > total:
        cost[to] = total
        continue
    if z_dist[to] == 0:
      continue
    if z_dist[to] <= s:
      price = q
    else:
      price = p

    if cost[to] > total + price:
      cost[to] = total + price
      heappush(que, (total + price, to))

print((cost[n - 1]))


# Optimized solution
from heapq import heappush, heappop
INF = 10 ** 20

n, m, k, s = list(map(int, input().split()))
p, q = list(map(int, input().split()))
z_dist = [INF] * n
que = []
for _ in range(k):
  c = int(eval(input())) - 1
  z_dist[c] = 0
  heappush(que, (0, c))

edges = [[] for _ in range(n)]
for _ in range(m):
  a, b = list(map(int, input().split()))
  a -= 1
  b -= 1
  edges[a].append(b)
  edges[b].append(a)

while que:
  total, node = heappop(que)
  for to in edges[node]:
    if z_dist[to] > total + 1:
      z_dist[to] = total + 1
      heappush(que, (total + 1, to))

cost = [INF] * n
cost[0] = 0
que = []
heappush(que, (0, 0))
while que:
  total, node = heappop(que)
  for to in edges[node]:
    if to == n - 1:
      print(total)
      que = []
      break
    if z_dist[to] == 0:
      continue
    if z_dist[to] <= s:
      price = q
    else:
      price = p

    if cost[to] > total + price:
      cost[to] = total + price
      heappush(que, (total + price, to))
# Original solution
from itertools import chain

a = list(open(0))
n = int(a[0].split()[0])
print((n - len(set(chain.from_iterable(list(map(str.split, a[2::2])))))))


# Optimized solution
R = lambda: list(map(int, input().split()))
n, k = R()
s = set()
for _ in range(k):
  R()
  s.update(R())
print((n - len(s)))
# Original solution
import sys
input = sys.stdin.readline
from collections import *

N, K = list(map(int, input().split()))
cnt = [0]*N

for _ in range(K):
    d = int(eval(input()))
    a = list(map(int, input().split()))
    
    for ai in a:
        cnt[ai-1] += 1

ans = cnt.count(0)
print(ans)

# Optimized solution
N, K = list(map(int, input().split()))
flag = [False]*N

for _ in range(K):
    d = int(eval(input()))
    A = list(map(int, input().split()))
    
    for Ai in A:
        flag[Ai-1] = True

print((flag.count(False)))
# Original solution
## coding: UTF-8
N,K = list(map(int,input().split()))

d = []
A = []
for i in range(K):
    d.append(int(eval(input())))
    A.append(list(map(int,input().split()))) 
#print(d)
#print(A)

have_not = [0] + [1] * N
for i in range(K):
    for j in range(len(A[i])):
        #print(A[i][j])
        have_not[A[i][j]] = 0

#print(have_not)
print((sum(have_not)))



# Optimized solution
## coding: UTF-8
N,K = list(map(int,input().split()))

havent = [0] + [1] * N

for i in range(K):
    d = int(eval(input()))
    a = list(map(int,input().split()))
    for e in  a:
        havent[e] = 0
print((sum(havent)))
# Original solution
(n,k),*p = [[*list(map(int, i.split()))] for i in open(0)]
a = sum([p[2*i+1] for i in range(k)],[])
print((n - len(set(a))))

# Optimized solution
n,k = list(map(int, input().split()))
a = set()
for i in [0]*k:
    _ = eval(input())
    a = a | set([*list(map(int, input().split()))])
print((n - len(a)))
# Original solution
n,k = list(map(int,input().split()))
people = list(range(1,n+1))

li = []
for i in range(k) :
  gomi = eval(input())
  [li.append(int(j)) for j in input().split()]
st = set(li)
  
ans = 0
for i in people :
  if not i in st :
    ans += 1
print(ans)

# Optimized solution
n,k = list(map(int,input().split()))

li = []
for i in range(k) :
  gomi = eval(input())
  [li.append(int(j)) for j in input().split()]
st = set(li)
  
print((n - len(st)))
# Original solution
def main():

    N, K = list(map(int, input().split()))
    v = [0 for _ in range(N)]
    for _ in range(K):
        d = int(eval(input()))
        A = list(map(int, input().split()))
        for u in A:
            v[u-1] += 1
    ans = 0
    for i in range(N):
        if v[i] == 0: ans += 1
    return ans

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


# Optimized solution
def main():

    N, K = list(map(int, input().split()))
    p = set()
    for _ in range(K):
        d = int(eval(input()))
        A = list(map(int, input().split()))
        for i in range(d):
            p.add(A[i])
    return N - len(p)

if __name__ == '__main__':
    print((main()))
# Original solution
N,K=list(map(int,input().split()))
A=[int(i) for i in range(1,N+1,1)]

for _ in range(K):
    d=int(eval(input()))
    A_lis=list(map(int,input().split()))
    
    for i in A_lis:
        if i in A: A.remove(i)
print((len(A)))

# Optimized solution
N,K=list(map(int,input().split()))
A=set()
for _ in range(K):
    d=int(eval(input()))
    A=A.union(set(map(int,input().split())))
print((N-len(A)))
# Original solution
a = 1;
treat = 0;
n, k = list(map(int, input().split()));

data = [input().split() for l in range(2*k)]


while a <= n:
    b = 0;
    d = 0;
    
    while b < k:
        search = int(data[2*b][0]);
        c = 0;
        
        while c < search:
            x = int(data[2*b+1][c]);
            if x == a :
                d = d + 1;
            c = c + 1
            
        b = b + 1;
        
    if d == 0:
        treat = treat + 1;
        
    a = a + 1;

print(treat);

# Optimized solution
a = 1;
treat = 0;
n, k = list(map(int, input().split()));
 
data = list(input().split() for l in range(2*k))
 
 
while a <= n:
    b = 0;
    d = 0;
    
    while b < k:
        search = int(data[2*b][0]);
        c = 0;
        
        while c < search:
            x = int(data[2*b+1][c]);
            if x == a :
                d = d + 1;
            c = c + 1
            
        b = b + 1;
        
    if d == 0:
        treat = treat + 1;
        
    a = a + 1;
 
print(treat);