import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x, y, l; x = sc.nextInt(); y = sc.nextInt(); l = sc.nextInt(); sc.close(); int ans; if(x == 0) ans = 0; else ans = 1; if (x < 0){ ans++; x *= -1; } System.out.println(x/l + y/l + ans); } }