a,b=gets.split.map &:to_i;p Math.sqrt a==b ?2*a*a :(a*a-b*b).abs