Solving problem by bodmas rule