n, k = [int(x) for x in input().split()]
if k == 1:print(0)
else:
  print( ((n - k) + 1) - 1) int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x n, k = [int(x) for x in input().split()] n [int(x) for x in input().split()] k if k == 1:print(0)
else:
  print( ((n - k) + 1) - 1) k == 1 k 1 print( ((n - k) + 1) - 1) print ((n - k) + 1) - 1 (n - k) + 1 n - k n k 1 1 k = [int(x) for x in input().split()] [int(x) for x in input().split()] k n, k = [int(x) for x in input().split()] [int(x) for x in input().split()] n
n, k = [int(x) for x in input().split()]
if k == 1:print(0)
else:
  print( ((n - k) + 1) - 1)