test_case_cnt = int(input())test_case_list = list() for i in list(range(test_case_cnt)): tmp_test_case = raw_input() test_case_list.append(tmp_test_case) for test_case in test_case_list: total = 0 tmp_score = 0 for index in test_case: if index == "X": tmp_score = 0 else: tmp_score += 1 total += tmp_score print total