#include using namespace std; int main() { int x, y, n; cin >> x >> y >> n; int ans = (abs(x) + n - 1) / n + (abs(y) + n - 1) / n + ((x * y == 0) ? 0 : 1); cout << ans << endl; return 0; }