#include using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t=1; while (t--) { int x,y,l; cin >> x >> y >> l; int x1 = abs(x); int y1 = abs(y); int c1 = x1+y1; int c2 = 0; if(c1%l==0){ c2 = c1/l; } else { c2 = c1/l + 1; } int ec = 0; if(x>0 && y>0){ ec = 1; } else if (x>0 && y<0){ ec = 2; } else if(x<0 && y>0){ ec = 1; } else if(x<0 && y<0){ ec = 2; } int fc = ec + c2; cout << fc << endl; } }