#include using namespace std; long long n, a, b; int main() { cin >> n >> a >> b; if (2 * a > b) cout << -a * (n - 1) - b * (n - (n - 1) / 2 * 2); else cout << a * (n - 1) - b * n; }