#include #include #include int main(void) { int ew,ns,fwd,ordertimes; scanf("%d",&ew); scanf("%d",&ns); scanf("%d",&fwd); ordertimes=ns/fwd; ns-=fwd*ordertimes; if(ns>0) { ordertimes++; } if(ew!=0) { ordertimes++; if(ew>0) { ordertimes+=ew/fwd; } else if(ew<0) { ordertimes+=(ew*-1)/fwd; } ew-=fwd*ordertimes; if(ew>0) { ordertimes++; } } printf("%d\n",ordertimes); }