#include using namespace std; int main() { long long a, b, c; cin >> a >> b >> c; a = abs(a); b = abs(b); long long ans = (b / c) + !!(b % c); if (a) ans += (a / c) + !!(a % c) + 1; cout << ans << '\n'; return 0; }