import sys input = sys.stdin.readline N, A, B = map(int, input().split()) if A+A>B: M = A+B if (N-1)%M