#include <bits/stdc++.h>
using namespace std;
string a, b;
int main() {
  vector<int> c(7, 0);
  cin >> a;
  b = "Bulbasaur";
  for (int i = 0; i < a.size(); i++) {
    switch (a[i]) {
      case 'B':
        c[0]++;
        break;
      case 'u':
        c[1]++;
        break;
      case 'l':
        c[2]++;
        break;
      case 'b':
        c[3]++;
        break;
      case 'a':
        c[4]++;
        break;
      case 's':
        c[5]++;
        break;
      case 'r':
        c[6]++;
        break;
    }
  }
  c[1] /= 2;
  c[4] /= 2;
  sort(c.begin(), c.end());
  cout << c[0] << endl;
  return 0;
}
