n=Complex *gets.split.map(&:to_i) p (1..1e9).find{|i|n.abs*2