import sys sys.setrecursionlimit(10 ** 6) INF = float('inf') MOD = 10**9 + 7 def solve(): def II(): return int(sys.stdin.readline()) def LI(): return list(map(int, sys.stdin.readline().split())) def LC(): return list(input()) def IC(): return [int(c) for c in input()] def MI(): return map(int, sys.stdin.readline().split()) D = II() A,B = MI() Cost = INF for x in range(D+1): if(Cost>x*A+(D-x)*B): Cost = x*A+(D-x)*B print(Cost) return solve()