Find the smallest integer n such that this statement is true for some integer x.

This is what I have so far.

32^n = 167x + 2

2^(5n) = 167x + 2

2^(5n) = 2 mod 167

Euler's Theorem: 32^(phi(167)) = 1 mod 167

32^166 = 1 mod 167

2^830 = 1 mod 167

2^831 = 2 mod 167

So, 2^(5n) = 2^831 mod 167.

How can I solve this modular equation for n?

This is from a math competition in 2008.