n, k = [int(i) for i in input().split(" ")]

print(n - k if k != 1 else 0) int(i) for i in input().split(" ") for i in input().split(" ") i input().split(" ") ().split () input split " " for i in input().split(" ") int(i) int i n, k = [int(i) for i in input().split(" ")] n [int(i) for i in input().split(" ")] k print(n - k if k != 1 else 0) print n - k if k != 1 else 0 k != 1 k 1 n - k n k 0 k = [int(i) for i in input().split(" ")] [int(i) for i in input().split(" ")] k n, k = [int(i) for i in input().split(" ")] [int(i) for i in input().split(" ")] n
n, k = [int(i) for i in input().split(" ")]

print(n - k if k != 1 else 0)