#include using namespace std; typedef long long ll; const int INF=0x3f3f3f3f; const ll LLINF=0x3f3f3f3f3f3f3f3fLL; const int MAX=505+10; char s[MAX]; int main() { int n,i,j,cnt; scanf("%d",&n); cnt=0; for(i=0;i