n, h, w = map(int, input().split()) if h < w: h, w = w, h if h == w == 1: print(0) elif w == 1: n1 = n // 2 n2 = n - n1 h -= 1 print(n1 * n2 * h) else: q, r = divmod(n, 4) h -= 1 w -= 1 if r == 0: print(q * q * 2 * (h + w) + q * q * 2 * (h + w)) elif r == 1: print((q * q + q * (q + 1)) * (h + w) + (q * (q * 1) + q * q) * (h + w)) elif r == 2: print(((q + 1) * (q + 1) + q * q) * (h + w) + q * (q + 1) * 2 * (h + w)) else: print(((q + 1) * (q + 1) + (q + 1) * q) * (h + w) + ((q + 1) * (q + 1) + (q + 1) * q) * (h + w))