#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;
using ll = long long;

ll solve(ll N, ll K, ll L) {
    // If there's only one square
    if (N == 1) {
        return 4LL * L * L;
    }
    
    // If squares don't overlap (K > 2L)
    if (K > 2 * L) {
        return N * 4LL * L * L;
    }
    
    // Calculate the area for overlapping squares
    // The width of each square is 2L
    ll sideLength = 2 * L;
    
    // Calculate the total span
    ll totalSpan = (N - 1) * K + 2 * L;
    
    // The area will be totalSpan × totalSpan
    return totalSpan * totalSpan;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    
    ll N, K, L;
    cin >> N >> K >> L;
    
    cout << solve(N, K, L) << "\n";
    
    return 0;
}