#include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); //aabb->N //aaabaaa -> N-2 //aaabbaaa -> N-2 //aaa -> -1 //aaaa ->0 string S; cin >> S; int N = S.size(); for (int i=0; i