import java.util.Scanner; class no48{ public static void main(String[] args) { Scanner stdIn=new Scanner(System.in); int x,y,l,s=0; x=stdIn.nextInt(); y=stdIn.nextInt(); l=stdIn.nextInt(); if(y<0) s+=2; if(x!=0&&y>=0) s++; if(x<0) x=-x; if(y<0) y=-y; s+=x/l; s+=y/l; if(x%l!=0) s++; if(y%l!=0) s++; System.out.print(s); } }