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