import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int Y = sc.nextInt(); int L = sc.nextInt(); int turn=0; int gox=0; int goy=0; if(X%L==0){ gox=Math.abs(X/L); }else{ gox=Math.abs(X/L)+1; } if(Y%L==0){ goy=Math.abs(Y/L); }else{ goy=Math.abs(Y/L)+1; } if(Y>=0){ if(X==0){ turn=0; }else{ turn=1; } }else{ turn=2; } int r = gox+goy+turn; System.out.println( r ); } }