#include using namespace std; using ll=long long; const int N=1e7+5; ll n, x, y, ans=4e18; int main() { // freopen("dice.in", "r", stdin); // freopen("dice.out","w",stdout); scanf("%lld %lld %lld", &n, &x, &y); if(n==1) { puts("0"); return 0; } if((__int128)n*y<=(ll)(1e18)) ans=min(ans, x+(n-1)*y); ll sq=sqrt(n), t=sq+sq-2; if(sq*sq q; ll now=1, b=0; for(int j=1; j<=i; j++) q.push(-2), now=now*2; while(now