//
// main.cpp
// to_be_better
//
// Created by Malek Alsadi on 26/05/2021.
#include <string>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;
typedef long long ll;
typedef long double ld;
void magic(){
int n,m,k;cin>>n>>m>>k;
ll sum=0;
int mx=max(m,k),mn=min(m,k);ll y=0;ll con=mx;
while(y<n){
sum+=mn;
y++;
if(sum>=mx){
mx+=con;
y++;
}
}
cout<<sum;
}
int main() {
int w=1;
//cin>>w;
while(w--){
magic();
cout<<endl;
}
return 0;
}