Evaluating the definite integral $\int_{-1}^1 \lfloor \arccos x \rfloor \,dx$ involving the greatest integer function 
Evaluating the definite integral $$\int_{-1}^1 \lfloor \arccos x \rfloor \,dx .$$

I tried it but unable to do as it is discontinuous. Somebody told me that you should do this by drawing graph---how?
Can anybody please give me the start?


Hint:
Use that arccosine is  a decreasing function, and that $\arccos(cos x)=x$ if $0\le x\le \pi$. Hence $f(x)=\lfloor\arccos x\rfloor$ is a step function, defined by:
$$f(x)=\begin{cases}3 &\text{if }\quad\!{-1}\le x\le\cos 3,\\2 &\text{if } \cos 3< x \le \cos 2, \\ 1  &\text{if } \cos 2< x\le \cos 1,\\ 0 &\text{if } \cos 1< x\le 1.\end{cases}$$
You should find $\enspace 3+\cos 1+\cos 2+\cos 3$.
