import java.util.Scanner; public class No48 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); //x座標 int Y = sc.nextInt(); //y座標 int L = sc.nextInt(); //一度に動ける距離 int count = 0; //命令した回数 if(X % L == 0) { count += Math.abs(X) / L; }else { count += Math.abs(X) / L + 1; } if(Y % L == 0) { count += Math.abs(Y) / L; }else { count += Math.abs(Y) / L + 1; } if(X != 0 && Y >= 0) { count++; }else if(Y < 0) { count += 2; } System.out.println(count); } }