#include<iostream>
#include<cstring>
#include<string>
using namespace std
;
int main(){
string s
;
cin
>>s
;
int count
= 0;
int ans
= 0;
int j
,i
;
for(i
= 0;i
< s
.length() ;i
++){
if(s
[i
] == 'X'){
count
= 0;
}else{
for( j
= i
;s
[j
] == 'O';j
++){
count
++;
ans
+= count
;
}
j
--;
i
= j
;
}
}
cout
<<ans
<<endl
;
return 0;
}
转载请注明原文地址:https://tech.qufami.com/read-7781.html