Just to preface, this isn't something that I've been given as homework, I'm not currently enrolled in any schooling, however as a matter of personal interest I wanted to work out the solution to the problem without a guess-check-improve method. I have an idea, and it seems too obvious to be true...