Abstract: We give an algorithm to compute the greatest integer that is not solution of a Diophantine inequality of the form $ax\mod b\le cx$. As a consequence we obtain, for various cases, a formula, function of $a$, $b$ and $c$, for that number.