// Nachia くんだよ #include #include #include using namespace std; using ll = long long; using ull = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) int main() { ll N,H,W; cin >> N >> H >> W; H--; W--; ll c = N / 4; ll ans = (c*N/2 + c*(N%4)) * 2*(W+H); if(W < H) swap(W,H); if(N % 4 == 1) ans += W; if(N % 4 == 2) ans += H+W; if(N % 4 == 3) ans += 2 * (H+W); cout << ans << endl; return 0; } struct ios_do_not_sync{ ios_do_not_sync(){ ios::sync_with_stdio(false); cin.tie(nullptr); } } ios_do_not_sync_instance;