#include #include #include #include using namespace std; int main() { int x, y, l, count=0; cin >> x >> y >> l; if(y >= 0){ if(x != 0){ count++; } }else{ if(x != 0){ count= count+2; } } count = count + abs(y)/l; if(abs(y)%l != 0){ count++; } count = count + abs(x)/l; if(abs(x)%l != 0){ count++; } cout << count << endl; return 0; }