a=input().strip() b=a.lower() for i in range(len(b)): if i+3<=len(b): window=b[i:i+3] if window=='bob': print(i) break else: print(-1) break