Sam has a certain number of apples. He decides to give 3/5 of them to his friend and keeps the remaining 80 apples for himself. How many apples did Sam have initially? Let's think step by step and output the final answer within \boxed{}.
user