#include using namespace std; typedef long long ll; typedef pair P; const int INF = 1e9; const int mod = 1e9+7; const double EPS = 1e-10; const double PI = acos(-1.0); int main() { int x,y,l; cin >> x >> y >> l; int ans = 0; ans += max((abs(x)+l-1),0)/l + max((abs(y)+l-1),0)/l; if(y < 0) ans += 2; else if(y == 0 && x != 0) ans += 1; else if(x != 0) ans += 1; cout << ans << endl; }