x,y=gets.not_nil!.split.map &.to_i n=3200 z=[0]*n*n*3 (1..n).each{|a|(0..n).each{|b|z[a*a+b*b]+=4}} p z[x,y-x+1].max