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