import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No00000048_Main2 { 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 cnt = 0; if(x != 0 || y != 0) { if(y >= 0) { if(x != 0) { cnt += 1; } } else { cnt += 2; } cnt += (Math.abs(x) / l) + (Math.abs(x) % l == 0 ? 0 : 1); cnt += (Math.abs(y) / l) + (Math.abs(y) % l == 0 ? 0 : 1); } System.out.println(cnt); } }