x,y,z = [int(input()) for _ in '1'*3] print(-(-(abs(x)+abs(y))//z)+(0 if x==0 else 1)+(1 if y<0 else 0))