# frozen_string_literal: true x, y = gets.chomp.split.map(&:to_i) r = (2 * Math.sqrt(x**2 + y**2)).floor + 1 p r