Case 1: 7 Case 2: 16 Case 3: 47