#include using namespace std; #define rep(i,n) for(int i = 0; i < int(n); i++) using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); int x,y,l; cin >> x >> y >> l; int ans = 0; if(x < 0) x *= -1; ans += (x+l-1)/l; if(y < 0) y *= -1; ans += (y+l-1)/l; if(x != 0 and y != 0) ans++; cout << ans << endl; return 0; }