n, a, b = map(int, input().split()) ans = sum(n % a > n % b for n in range(1, n + 1)) print(ans)