`` #include[HTML_REMOVED]
using namespace std;
include[HTML_REMOVED]
const int N = 1e6 + 10;
int sum[N];
bool st[N];
int main()
{
string s;
cin>>s;
int res = 0;
int i;
for(i = 0; i < s.size(); i){
if(s.size() == 1) break;
if(st[i] == true) continue;
if(s[i] == ‘?’){
if(s[i + 1] == ‘?’){
res ;
st[i + 1] = true;
}
else {
res ;
st[i + 1] = true;
}
}
else {
if(s[i + 1] == ‘?’){
res ;
st[i + 1] = true;
}
else{
if(s[i] == s[i + 1]){
res ++;
st[i + 1] = true;
}
else continue;
}
}
}
cout<<res<<endl;
return 0;
}
//朴实无华的if else