#include #include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 4000000000000000001 long long N,A,B; int main() { cin>>N>>A>>B; if(N%2==0){ long long ans = Inf64; ans = min(ans,A*(N-1) - B*N); long long t = N/2; ans = min(ans,-A*t); if(N>=3)ans = min(ans,-A*((t-1)*2) - B * 2); cout<