import java.util.*; public class Main { public static void main(String[] args) throws Exception { // Your code here! Scanner sc = new Scanner(System.in); int x = Integer.parseInt(sc.nextLine()); int y = Integer.parseInt(sc.nextLine()); int l = Integer.parseInt(sc.nextLine()); int count = 0; int dis = 0; // 向きの変更回数 if(y > 0 && x != 0) { count++; }else if(y < 0) { count += 2; } if(y % l != 0) { dis = y / l + 1; count += dis; }else { dis = y / l; count += dis; } if(x < 0) { x = -x; } if(x % l != 0) { dis = x / l + 1; count += dis; }else { dis = x / l; count += dis; } System.out.println(count); } }