procedure main() while a:=reads(,4)&write((a+read()^2/a+2)/4) end