import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int x = Math.abs(sc.nextInt()); int y = Math.abs(sc.nextInt()); int leng = sc.nextInt(); int times = (x+leng-1)/leng + (y+leng-1)/leng; if (y < 0) {times += 2;} else if (y>0 && x!=0) {times += 1;} System.out.println(times); } }