import java.util.Scanner; public class Main { public static void main(String[] a) { Scanner s=new Scanner(System.in); int X=s.nextInt(),Y=s.nextInt(),L=s.nextInt(),H=(int)Math.ceil(Math.abs((double)X/L)),V=(int)Math.ceil(Math.abs((double)Y/L)); System.out.println(H+V+(Y<0?2:X==0?0:1)); } }