How to find value of floor function of a given number? I am considering numbers $n = 3m + 1$ and $p = 3q$, where $m$ and $q$ are some positive integers.
I want to find the value of $\lfloor \frac{3m + 1}{2} \rfloor$ and $\lfloor \frac{3q}{2} \rfloor$. I know somewhere the answer depends on the values of $m$ and $q$. 
For a particular number I can write but my mind is not working to find the generalised value. 
Kindly help.  

If $m$ is odd, $3m+1$ is even and $\displaystyle \left\lfloor \frac{3m+1}{2}\right\rfloor=\frac{3m+1}{2}$.
If $m$ is even, $3m+1$ is odd and $\displaystyle \left\lfloor \frac{3m+1}{2}\right\rfloor=\frac{3m}{2}$.
If $q$ is odd, $3q$ is odd and $\displaystyle \left\lfloor \frac{3q}{2}\right\rfloor=\frac{3q-1}{2}$.
If $q$ is even, $3q$ is even and $\displaystyle \left\lfloor \frac{3q}{2}\right\rfloor=\frac{3q}{2}$.
