So the answer to your question is in Maximum amount willing to gamble given utility function $U(W)=\ln(W)$ and $W=1000000$ in the game referred to in St. Petersberg's Paradox?
The value of $F$ is found by finding the solution to the equation
$\displaystyle \sum_{h=0}^{\infty}\ln(1000000-F+2^h)\cdot\left(\frac{1}{2}\right)^{h+1}=\ln(1000000)$
So you must compute the value of $\displaystyle \sum_{h=0}^{\infty}\ln(1000000-F+2^h)\cdot\left(\frac{1}{2}\right)^{h+1}$ for different values of $F$ and try to get closer and closer to the value of $F$ that will make $\displaystyle \sum_{h=0}^{\infty}\ln(1000000-F+2^h)\cdot\left(\frac{1}{2}\right)^{h+1} = \ln(1000000)$.
This can be done with a spreadsheet software like OpenCalc or excel. If you are stuck with how to do this precisely, you should start by learning the basics of these spreadsheet software. Google is your friend if your are lost (type "excel basics tutorial" or something?) or think about other SE site such as https://superuser.com/.