n,k = map(int, input().split())
ma = n//k + n%k
mi = n//k
print(ma -mi) n,k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k ma = n//k + n%k ma n//k + n%k n//k n k n%k n k mi = n//k mi n//k n k print(ma -mi) print ma -mi ma mi n,k = map(int, input().split()) map(int, input().split()) n mi = n//k n//k mi ma = n//k + n%k n//k + n%k ma k = map(int, input().split()) map(int, input().split()) k
n,k = map(int, input().split())
ma = n//k + n%k
mi = n//k
print(ma -mi)