import java.util.Scanner; public class No48 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); int l = sc.nextInt(); x=Math.abs(x); y=Math.abs(y); int mx,my; if(x%l==0){ mx=x/l; }else{ mx=x/l+1; } if(y%l==0){ my=y/l; }else{ my=y/l+1; } if(x == 0&&y == 0){ System.out.println(0); }else if(x == 0 && y < 0){ System.out.println(my + 1); }else if(x != 0 && y==0){ System.out.println(mx); }else{ System.out.println(mx+my+1); } } }