I think that we win if the ticket contains all the six winning numbers chosen and each ticket has six distinct numbers between 1 and 50.
Then the probability to win is $p=\frac{1}{\binom{50}{6}}$. Then the expected value of the final profit should be $$E=(-1)\cdot (1-p)+(10^7-1)\cdot p.$$
P.S. Notice that the expected value for lotteries is "always" negative, otherwise...