Jim had 92 more marbles than Sam. After Sam gave Jim 18 marbles, Jim had twice as many marbles as Sam. How many marbles did Jim have at first?