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 n=0; if(y<0)n=2; else if(x!=0)n=1; System.out.println((Math.abs(x)+l-1)/l+(Math.abs(y)+l-1)/l+n); } }