In a certain number system with base 7, a number is represented as 542. Convert this number to its equivalent in the decimal (base 10) system. Let's think step by step and output the final answer within \boxed{}.
user