/* No.48 ロボットの操縦 https://yukicoder.me/problems/no/48 */ #include using namespace std; int calc(int x, int l) { if (x % l == 0) return x / l; else return x / l + 1; } int main() { ios::sync_with_stdio(0); cin.tie(0); long int dist = 0; long int x, y, l; cin >> x >> y >> l; x = abs(x); y = abs(y); dist += calc(x, l); dist += calc(y, l); if (y < 0) dist += 2; else if (x != 0 && y >= 0) dist += 1; else dist += 0; cout << dist << endl; }