You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
343 B

#include <bits/stdc++.h>
using namespace std;
string s;
int main() {
cin >> s;
for (int i = 0; i < s.size(); i++)
if (s[i] >= 'A' && s[i] <= 'Z') s[i] += 32;
int cnt = 0;
for (int i = 0; i < s.size(); i++)
if (s.substr(i, 4) == "lqbs") cnt++;
cout << cnt << endl;
return 0;
}