#include <bits/stdc++.h>
using namespace std;
const int NMAX = 100000;
string str;
string pok = "Bulbasaur";
int f[300];
int main() {
  cin >> str;
  int ind = 0, cnt = 100000;
  for (auto ch : str) {
    ++f[ch];
  }
  for (auto ch : pok) {
    int cc = 0;
    for (auto ch2 : pok) {
      cc += (ch == ch2);
    }
    cnt = min(cnt, f[ch] / cc);
  }
  cout << cnt << '\n';
  return 0;
}
