eval"A,B="+gets.split*?,
p (A*B-1)/(A==B ? 4:2)