#include using namespace std; int main(){ int x, y, l; cin >> x >> y >> l; long ans = abs(x) / l + abs(y) / l; if(x != 0)ans++; if(y != 0)ans++; cout << ans << endl; }