#include <iostream> using namespace std; int main(){ int ans=0; string a,b; cin>>a>>b; for (int i=1;i<a.size()-1;++i){ if (a[i-1]!=a[i+1]) continue; for (int j=1;j<b.size()-1;++j) if (b[j-1]==b[j+1] && b[j-1]==a[i] && a[i-1]==b[j]) ++ans; } cout<<ans; return 0; }
7
6
2015
6
2015