import java.util.*; class S18_robot{ public static void main(String[] args){ int x, y, l; int count = 0; Scanner scn = new Scanner(System.in); x = scn.nextInt(); y = scn.nextInt(); l = scn.nextInt(); if(y < 0){ count += 2; }else if(Math.abs(x) > 0){ count ++; } if(x % l == 0) count += Math.abs(x) / l; else count += Math.abs(x) / l + 1; if(y % l == 0) count += Math.abs(y) / l; else count += Math.abs(y) / l + 1; System.out.println(count); } }