#include #include using namespace std; #define ABS(x) ((x < 0) ? -x : x) int main() { int x, y, l, ans = 0; cin >> x >> y >> l; ans = ceil( ABS(x) / (double)l) + ceil( ABS(y) / (double)l); if (x == 0 && y < 0) ans+=2; if (x != 0 && y >= 0) ans++; if (x < 0 && y < 0) ans++; printf("%d\n", ans); return 0; }