import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); // 整数の入力 int x = sc.nextInt(); int y = sc.nextInt(); double l = sc.nextInt(); double countx = 0; double county = 0; int countturn = 0; countx = Math.ceil(Math.abs(x) / l); county = Math.ceil(Math.abs(y) / l); //System.out.println(countx); //System.out.println(county); if(y < 0) countturn = 2; else if(x == 0) countturn = 0; else countturn = 1; //System.out.println(countturn); int total = 0; total = (int)countx + (int)county + countturn; System.out.println(total); } }