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