import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(), y = sc.nextInt(), t = sc.nextInt(), cnt = 0; if (x < 0) { x *= -1; } if (x > 0) { cnt++; } if (y < 0) { y *= -1; if (x > 0) { cnt++; } else { cnt += 2; } } cnt += x / t + y / t; if (x % t > 0) { cnt++; } if (y % t > 0) { cnt++; } System.out.println(cnt); } }