[add] ugly numbers (linear solution)