x=read_line.to_i y=read_line.to_i l=read_line.to_i if x==0 & y>=0 puts (y/l).ceil.to_i else if y>=0 puts ((y/l).ceil+(x/l).abs.ceil).to_i+1 else puts ((y/l).abs.ceil+(x/l).abs.ceil).to_i+2 end end