#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 = 0; int c2 = 0; if(x1%l==0){ c1 = x1/l; } else { c1 = x1/l + 1; } if(y1%l==0){ c2 = y1/l; } else { c2 = y1/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; } if(x==0 && y>0){ ec = 0; } if(x==0 && y<0){ ec = 2; } if(x!=0 && y==0){ ec = 1; } if(x==0 && y==0){ ec = 0; } int fc = ec + c1 + c2; cout << fc << endl; } }