import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int x = Integer.parseInt(br.readLine()); int y = Integer.parseInt(br.readLine()); int l = Integer.parseInt(br.readLine()); int xl = (Math.abs(x) + l - 1) / l; int yl = (Math.abs(y) + l - 1) / l; int sum = 0; if (y >= 0) { if (x == 0) { sum = xl + yl; } else { sum = xl + yl + 1; } } else { sum = xl + yl + 2; } System.out.println(sum); } }