#include using namespace std; long long combi(long long w){ return (w * (w-1))/2; } int main(void){ string s; cin >> s; long long c = 0; long long ret = 0; vector w(s.size()); for(int i=0;i0;i--) w[i-1] += w[i]; for(int i=0;i