import java.util.Arrays; import java.util.LinkedList; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); final long X = sc.nextLong(); final long Y = sc.nextLong(); final long L = sc.nextLong(); System.out.println(((Math.abs(X) / L) + (Math.abs(X) % L != 0 ? 1 : 0)) + ((Math.abs(Y) / L) + (Math.abs(Y) % L != 0 ? 1 : 0)) + (Y < 0 ? 2 : 1)); } }