for _ in range(int(input())): input() print(input().count('0') + 1)