#include <iostream>
#include <string>
#include <cctype>
using namespace std;

int main() {
    string s;
    cin >> s;
    
    string target = "bob";
    int n = s.size();
    
    for (int i = 0; i <= n - 3; i++) {
        int j = 0;
        while (j < 3 && tolower(s[i + j]) == target[j]) {
            j++;
        }
        if (j == 3) {
            cout << i << endl;
            return 0;
        }
    }
    
    cout << -1 << endl;
    return 0;
}