Avoid using a costly MOD operation