#include using namespace std; int main(void) { int x, y, l; cin >> x >> y >> l; cout << (abs(x) + l - 1) / l + (abs(y) + l - 1) / l + (x != 0 && y != 0) << endl; return 0; }