#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define INF (1 << 30) #define INFLL (1LL << 60) int main() { int x,y,l; int ans = 0; cin >> x >> y >> l; ans += abs(x) / l + abs(y) / l; if(x % l != 0) ans++; if(y % l != 0) ans++; if(x != 0) ans++; if(y < 0 && x == 0) ans += 2; else if(y < 0) ans++; cout << ans << endl; return 0; }