import strscans

let (_, w, z, b) = stdin.readAll.scanTuple"$f $f $f"

echo int (w + z) * (b + 1)