N,A,B = map(int, input().split()) rem = N%(A+B) if rem