foreach a\ b [read stdin] {puts [expr $a+$b*$b/$a+2>>2]}