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=X/L; }else{ gox=X/L+1; } if(Y%L==0){ goy=Y/L; }else{ goy=Y/L+1; } if(X!=0){ turn=1; } if(Y<0){ turn=turn+1; } int r = gox+goy+turn; System.out.println( r ); } }