#include <bits/stdc++.h>
using namespace std;
int main() {
  char ch[] = {'B', 'u', 'l', 'b', 'a', 's', 'a', 'u', 'r'};
  map<char, int> mp;
  string ss;
  int n, k, i, cnt = 100000;
  cin >> ss;
  for (i = 0; i < ss.size(); i++) {
    mp[ss[i]]++;
  }
  for (i = 0; i < 9; i++) {
    k = mp[ch[i]];
    if (ch[i] == 'u' || ch[i] == 'a') k = k / 2;
    cnt = min(cnt, k);
  }
  cout << cnt << endl;
  return 0;
}
