#include using namespace std; /////////////////// メイン /////////////////// int main () { //////////////////// 入力 //////////////////// int x, y, l; cin >> x >> y >> l; //////////////// 出力変数定義 //////////////// int result = 0; //////////////////// 処理 //////////////////// if (y>=0) { if (x!=0) result += 1; } else { result += 2; } result += (abs(x)+l-1)/l; result += (abs(y)+l-1)/l; //////////////////// 出力 //////////////////// cout << result << endl; //////////////////// 終了 //////////////////// return 0; }