#include <bits/stdc++.h>
using namespace std;
map<char, long long> mpa;
int main() {
  string s;
  cin >> s;
  for (int ii = 0; ii < s.size(); ii++) {
    char as = s[ii];
    mpa[as]++;
  }
  string k = "Bulbsar";
  long long mnn = 1000002568;
  for (int i = 0; i < k.size(); i++) {
    if (k[i] == 'a' || k[i] == 'u') {
      mnn = min(mnn, (mpa[k[i]] / 2));
    } else
      mnn = min(mnn, mpa[k[i]]);
  }
  cout << mnn << "\n";
  return 0;
}
