#include <stdio.h>

int main() {
    char s[101];
    scanf("%s", s);
    int len = strlen(s);
    for (int i = 0; i <= len - 3; i++) { //遍历每个可能的起始位置
        if (tolower(s[i]) == 'b' && tolower(s[i + 1]) == 'o' &&
                tolower(s[i + 2]) == 'b') {
            printf("%d\n", i);
            return 0;
        }
    }
    //未找到分配
    printf("-1\n");
    return 0;

}