Only handle numbers up to 1e6