a = input().split()
a = [int(i) for i in a]
if a[1] == 1:
  print(0)
else:
  print(a[0]-a[1]) a = input().split() a input().split() ().split () input split int(i) for i in a for i in a i a for i in a int(i) int i a = [int(i) for i in a] a [int(i) for i in a] if a[1] == 1:
  print(0)
else:
  print(a[0]-a[1]) a[1] == 1 a[1] a 1 1 print(0) print 0 print(a[0]-a[1]) print a[0]-a[1] a[0] a 0 a[1] a 1 a = input().split() input().split() a a = [int(i) for i in a] [int(i) for i in a] a
a = input().split()
a = [int(i) for i in a]
if a[1] == 1:
  print(0)
else:
  print(a[0]-a[1])