Geric had twice as many bills as Kyla who has 2 fewer bills than Jessa. After giving 3 bills to Geric, Jessa has 7 bills left. How many bills did Geric have at the beginning?