2.2. Let $r=x-\lfloor x\rfloor$. Write $\lfloor x\rfloor=l p+q$, where $l, q \in \mathbb{Z}$ and $0 \leq q0$. $)$

Then $\left\lfloor\frac{q+r}{p}\right\rfloor=0$ and $\left\lfloor\frac{-q-r-1}{p}\right\rfloor=\left\{\begin{array}{ll}-2 & \text { if } q=p-1 \text { and } r>0 \\ -1 & \text { otherwise }\end{array}\right.$.
Hence, $A=\left\{\begin{array}{ll}-2 & \text { if } q=p-1 \text { and } r>0 \\ -1 & \text { otherwise }\end{array}\right.$.
(ii) $(p=-1$. $)$

Then $\left\lfloor\frac{q+r}{p}\right\rfloor=\left\{\begin{array}{ll}-q & \text { if } r=0 \\ -q-1 & \text { if } r>0\end{array}\right.$ and $\left\lfloor\frac{-q-r-1}{p}\right\rfloor=q+1$.
Hence, $A=\left\{\begin{array}{ll}1 & \text { if } r=0 \\ 0 & \text { if } r>0\end{array}\right.$.
(iii) $(p0\end{array}\right.$ and $\left\lfloor\frac{-q-r-1}{p}\right\rfloor=\left\{\begin{array}{ll}1 & \text { if } q+r+1 \geq-p \\ 0 & \text { if } q+r+1<-p\end{array}\right.$.
Hence, $A=\left\{\begin{array}{ll}0 & \text { if } q+r=0 \text { or } q+r \geq-p-1 \\ -1 & \text { if } 0<q+r<-p-1\end{array}\right.$.
Therefore the possible values of the expression $A-1$ are $-3,-2,-1$, and 0 .
2.2. Find all possible values of
$$
\left\lfloor\frac{x-p}{p}\right\rfloor+\left\lfloor\frac{-x-1}{p}\right\rfloor,
$$
where $x$ is a real number and $p$ is a nonzero integer.
Here $\lfloor z\rfloor$ denotes the greatest integer less than or equal to $z$.