x=read_line.to_i y=read_line.to_i l=read_line.to_i k=y<0?1:0 m=x!=0?1:0 puts ((x/l).abs.ceil+(y/l).abs.ceil).to_i+k+m