#include <string>
#include <iostream>
using namespace std;
int main() {
int n;
string s;
cin >> n;
getchar();
while (n--) {
getline(cin, s); //读取一行
int count = 0;
for (int i = 0; i < s.length(); i++) {
if (s[i] < 0) count++; //若小于0,就是汉字
}
cout << count / 2 << endl; //双字节除以2
}
return 0;
}
02-07
523
01-09
1157
07-25