#!/usr/bin/ruby a,b=gets.split.map(&:to_i) p (Math.hypot(a,b)*2).to_i+1