Case 1: 0 Case 2: 3 Case 3: 1