In UK schools we are taught BODMAS:
Brackets
Of (as in "to the power of")
Divide and Multiply
Add and Subtract
In the US they say PEMDAS (P and E being parentheses and exponent respectively). No doubt other countries use something equivalent.
If you apply this rule you will get the right answer, as long as you also remember to carry out operations with the same precedence left-to-right.