foreach a\ b [read stdin] {puts [expr round(($a*$a/$b+$b)/2.)]}