#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int B, u, l, b, a, s, r;
  B = u = l = b = a = s = r = 0;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == 'B')
      B++;
    else if (str[i] == 'u')
      u++;
    else if (str[i] == 'l')
      l++;
    else if (str[i] == 'b')
      b++;
    else if (str[i] == 'a')
      a++;
    else if (str[i] == 's')
      s++;
    else if (str[i] == 'r')
      r++;
  }
  cout << min(min(B, min(l, min(s, min(r, b)))), min(u / 2, a / 2)) << endl;
}
