const Main = (input) => {
  const tmp = input.trim().split(' ').map(Number)

  const center = tmp.sort(function (a, b) { return a - b })
  const Max = center.pop()
  const Min = center.shift()

  const maxSplit = Math.floor(Max / 2)

  const Vr1 = maxSplit * center * Min
  const Vb1 = (Max - maxSplit) * center * Min
  const Vv1 = Math.abs(Vb1 - Vr1)

  const minSplit = Math.floor(Min / 2)

  const Vr2 = minSplit * center * Max
  const Vb2 = (Min - minSplit) * center * Max
  const Vv2 = Math.abs(Vb2 - Vr2)

  const centerSplit = Math.floor(center / 2)

  const Vr3 = centerSplit * Max * Min
  const Vb3 = (center - centerSplit) * Max * Min
  const Vv3 = Math.abs(Vb3 - Vr3)

  var result = [Vv1, Vv2, Vv3].sort().shift()

  console.log(result)
  return result
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'))