Math Help - finding the size sample

1. finding the size sample

A political candidate has asked you to construct a poll to determine what percentage of people support her. If the candicate only wants a 5% margin error at a 90% confidence level , what size of sample is needed?

I believe that z = 1.64485 , and I would normally use n = ( z*o/ margin error)^2 to solve this problem ; is there another formula that I can use?....... Could I get some help. thanks in advance!!

2. I already solved it myself using this formula n = ((z/m)^2 )* p(1-p)
So ( 1.644853626/.05)^2 * (.5(1-.5)) ; since I didn't have a value for p , I'm using .5 . Finally, the size of the sample is equal to 270.5