#include typedef long long ll; #define FOR(i,a,b) for(ll i=(a);i<(b);i++) #define REP(i,a) FOR(i,0,a) using namespace std; const ll MAX_N=5000; ll N; char S[MAX_N+1]; int main(){ ios::sync_with_stdio(false); cin.tie(0); cin>>N>>S; ll ans=0; REP(i,N){ FOR(j,i+1,N){ ll k=2*j-i; if(k