import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int X = scan.nextInt(); int Y = scan.nextInt(); int L = scan.nextInt(); scan.close(); int ans = 0; if(Y < 0) { ans = 1; Y = - Y; } if(X != 0) { ans += 1; if(X < 0) { X = - X; } } ans += X / L + Y / L; if(X % L > 0) { ans += 1; } if(Y % L > 0) { ans += 1; } System.out.println(ans); } }