d = int(input()) a, b =map(int, input().split()) x_list =list(range(0, d + 1)) ans_list = [] for x in range(len(x_list)): ans = x * a + (d - x) * b ans_list.append(ans) print(min(ans_list))