Optimize odd numbers checking