#include using namespace std; typedef long long ll; #define reps(i,a,b) for(int i=(a);i<(b);++i) #define rep(i,n) reps(i,0,n) #define all(x) (x).begin(),(x).end() #define INF (1000000000) #define MOD (1000000007) #define PI (acos(-1)) int main(){ int n; cin >> n; string s; cin >> s; int cnt=0; rep(i,n){ reps(j,i+1,n){ int k=2*j-i; if(k