#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); int x, y, l; cin >> x >> y >> l; int ans = 0; if(x == 0) { if(y < 0) ans += 2; } else { if(y >= 0) ans++; else ans += 2; } cout << ans + (abs(x) + l - 1) / l + (abs(y) + l - 1) / l << '\n'; return 0; }