Up to what value should we build a sieve to find the solution to Deepak And Primes

Deepak And Primes problem states that we need to give nth prime number where n can be as large as 5,000,000.
I could not figure out where exactly the 5000000th prime number will be
using prime Number theorem also seems unfruitful

5000000 = x/ln(x);
where x~ 135,000,000

we can only build segment sieve once we know what is the segment for such a large prime number, or it has to be done in some other way?

To solve Deepak and Prime, build sieve upto a very large no say 10^8 and simultaneously keep pushing the prime nos to a vector. The answer would be the value in 5000000 th index of this vector.

Calculating the value upto which the sieve has to be build would be complex and trivial.