x=gets.to_i.abs y=gets.to_i l=gets.to_i res=(x+l-1)/l+(y.abs+l-1)/l if x>0 then res+=y<0 ? 2 : 1 elsif y<0 then res+=2 end p res