At the start of lunch Jimmy and Jake each brought out a new bag of x marbles to play with their friends. By the end of lunch they were surprised to see they still had the same number as each other even though overall Jimmy had gained 5 marbles and Jake had ended up with two lots of 3 less than his original amount. How many marbles were originally in the bags?