import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int x = sc.nextInt(); int y = sc.nextInt(); int L = sc.nextInt(); int ans = 0; if (y>=0 && x!=0) ans += 1; else if (y<0 && x!=0) ans += 2; // System.out.println(":"+ans); if (x%L == 0) ans += Math.abs(x/L); else ans += Math.abs(x/L) + 1; // System.out.println(":"+ans); if (y%L == 0) ans += Math.abs(y/L); else ans += Math.abs(y/L) + 1; System.out.println(ans); } }