N, K = [int(i) for i in input().split()]
print(N - K if K >= 2 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 >= 2 else 0) print N - K if K >= 2 else 0 K >= 2 K 2 N - K N K 0 N, K = [int(i) for i in input().split()] [int(i) for i in input().split()] N 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()]
print(N - K if K >= 2 else 0)