# include <bits/stdc++.h>

# define FOR(i,a,b) for (int i=(a);i<(b);i++)
# define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
# define REP(i, n) for (int i = 0; i < (int)(n); i++)
# define RREP(i,n) for (int i=(n)-1;i>=0;i--)

# define int(x) int x; scanf("%d",&x);
# define vint(v,n) vector<int> v(n); REP(i,n) scanf("%d", &v[i]);
# define string(x) string x; cin >> x;
# define all(a) a.begin(),a.end()

# define INF 1<<30
typedef long long ll;
const ll MOD = 1e9+7;

using namespace std;

namespace utils{
  template <typename T> void print(vector<vector<T>> mat) {
    REP (i, mat.size()) {
      REP (j, mat[0].size()) cout << mat[i][j] << ' ';
      cout << endl;
    }
  }

  template <typename T> void print(vector<T> v) {
    REP (i, v.size())
      if (i >= v.size()-1)
	cout << v[i];
      else
	cout << v[i] << ' ';
    
    cout << endl;
  }

  template <typename T> pair<T, T> shape(vector<vector<T>> mat) {
    int d1, d2;

    d1 = mat.size();
    if (d1 > 0) d2 = mat[0].size();
    else int d2 = 0;
    cout << "(" << d1 << ", " << d2 << ")" << endl;
    return make_pair(0, 0);
  }

  template <typename T> vector<vector<T>> empty(int n, int m) {
    vector<vector<T>> mat(n, vector<T>(m));
    return mat;
  }
}


int main() {
  int(x);
  int(y);
  int(l);
  int cnt = 0;
  
  if(y >= 0){
    cnt += y/l;
    if(y%l != 0)
      cnt++;
    if(x == 0){
    }else{
      cnt += abs(x)/l;
      if(abs(x)%l != 0)
	cnt++;
      cnt++;
    }
  }else{
    cnt += abs(y)/l;
    if(y%l != 0)
      cnt++;
    if(x == 0){
    }else{
      cnt += abs(x)/l;
      if(abs(x)%l != 0)
	cnt++;
    }
    cnt +=2;
  }
  cout << cnt << endl;
}