d=eval'(%d)**2+(%d)**2'%gets.split 1.upto(1e5){|r|r**2>4*d&&(p r;break)}