xzahyo = int(input()); yzahyo = int(input()); kyori = int(input()); counter = 0; if yzahyo ==0: if xzahyo > 0: counter = counter + int(xzahyo/kyori); if xzahyo%kyori > 0: counter = counter + 1; elif xzahyo < 0: counter = counter + int(-xzahyo/kyori); if (-xzahyo)%kyori > 0: counter = counter + 1; elif yzahyo < 0: if xzahyo > 0: counter = counter + int(xzahyo/kyori)+1; if xzahyo%kyori > 0: counter = counter + 1; elif xzahyo < 0: counter = counter + int(-xzahyo/kyori)+1; if (-xzahyo)%kyori > 0: counter = counter + 1; counter = counter + int(-yzahyo/kyori)+1; if (-yzahyo)%kyori > 0: counter = counter + 1; elif yzahyo > 0: counter = counter + int(yzahyo/kyori); if yzahyo%kyori > 0: counter = counter + 1; if xzahyo > 0: counter = counter + int(xzahyo/kyori)+1; if xzahyo%kyori > 0: counter = counter + 1; elif xzahyo < 0: counter = counter + int(-xzahyo/kyori)+1; if (-xzahyo)%kyori > 0: counter = counter + 1; print(counter);