Write out the problem vertically to see it more clearly.