#import int n,j,k,re;char s[501];main(){std::cin>>n>>s;for(re=0,n++;--n;)for(j=n;j--;)for(k=0;k