import java.io.*; import java.util.*; /*yukicoder No.48 ロボットの操縦*/ class No48{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); double x = scan.nextInt(); double y = scan.nextInt(); double l = scan.nextInt(); double count = 0; if(y<0){ y = -y; count += 2; }else if(x==0){ }else{ count++; } count += Math.ceil(y/l); if(x<0) x = -x; count += Math.ceil(x/l); System.out.println((int)count); } }