import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class No48 { public static void main(String[] args) throws IOException, NumberFormatException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int touzai = Integer.parseInt(br.readLine()); int nanboku = Integer.parseInt(br.readLine()); int zenshin = Integer.parseInt(br.readLine()); int x = Calculation.calc(touzai,zenshin); int y = Calculation.calc(nanboku,zenshin); if (touzai != 0 && nanboku != 0) System.out.println(x+y+1); else System.out.println(x+y); } public static class Calculation{ public static int calc(int x, int y){ if (Math.abs(x)%y == 0) return (Math.abs(x)/y); else return (Math.abs(x)/y) + 1; } } }