A, B = map(int, input().split()) print(A - A // abs(B) * abs(B))