import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); try { int X = Integer.parseInt(buff.readLine()); int Y = Integer.parseInt(buff.readLine()); int L = Integer.parseInt(buff.readLine()); int ans = 0; if(Y > 0){ if(X != 0){ ++ans; } }else if(Y < 0){ ans += 2; }else{ ++ans; } if(X < 0){ X *= -1; } if(Y < 0){ Y *= -1; } ans += X / L; if(X % L > 0){ ans++; } ans += Y / L; if(Y % L > 0){ ans++; } System.out.println(ans); } catch (NumberFormatException e) { } catch (IOException e) { } } }