import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner koko = new Scanner(System.in); int x = koko.nextInt(); int y = koko.nextInt(); int l = koko.nextInt(); int dx = Math.abs(x); int dy = Math.abs(y); int mx = dx%l; int my = dy%l; int nx, ny; if(mx!=0){ nx = 1+((dx-mx)/l); }else{ nx =dx/l; } if(my!=0){ ny = 1+((dy-my)/l); }else{ ny =dy/l; } if(x==0&&y==0){ System.out.println(0); }else if(x==0&&y>0){ System.out.println(ny); }else if(x!=0&&y==0){ System.out.println(nx+1); }else if(x!=0&&y>0){ System.out.println(nx+ny+1); }else{ System.out.println(nx+ny+2); } } }