レスさんくす
言語はjava midpです。
445さんの方法で
Math.floor(Math.abs((int - 1)/5))
したのですが、MIDPではMath.floorが使えないみたいなのでこまってます…