#include using namespace std; typedef long long ll; int main() { int x, y, l; cin >> x >> y >> l; int rot; if (y < 0) { rot = 2; y = -y; } else if (x == 0) rot = 0; else rot = 1; if (x < 0) x = -x; cout << (x+l-1)/l + (y+l-1)/l + rot << endl; return 0; }