#include #include #include #include #include #include #include using namespace std; typedef long long LL; LL iabs(LL n){ if(n < 0) return -n; return n; } int main(){ LL x, y, L; cin >> x >> y >> L; LL ans = (iabs(x)+L-1)/L + (iabs(y)+L-1)/L; if(y >= 0){ if(x != 0) ans++; }else{ ans += 2; } cout << ans << endl; return 0; }