Case #1: 1 Case #2: 4 Case #3: -1 Case #4: 7 Case #5: -1 Case #6: 5172260357 Case #7: 0