Many researchers expect that Internet of Things (IoT) era will arrive. As result huge amount of M2M devices will appear. However, current LTE system is not suitable for this massive amount of M2M devices. Preamble is a kind of resource that is used for random access of devices. The problem is that while expected number of M2M devices in the future is so large, the number of preamble is restricted to 64. What is worse, 64 preambles cannot be used for M2M communications because some of them are reserved for H2H communications. Among studies to solve these kinds of problem, code-expanded scheme can be a powerful method. However until now, code-expanded scheme is not analyzed, but just introduced. In this paper, code-expanded scheme is analyzed in terms of access time to success random access and ratio of idle resources. We proposed an optimization problem to utilize code-expanded scheme efficiently.