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