#include <bits/stdc++.h>
using namespace std;
int main() {
  string b = "Bulbasaur", s;
  int ar[9];
  for (int i = 0; i < 9; i++) ar[i] = 0;
  int rez = 1e9;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    for (int j = 0; j < b.length(); j++) {
      if (s[i] == b[j]) ar[j]++;
    }
  }
  for (int i = 0; i < 9; i++) rez = min(rez, ar[i]);
  rez = min(rez, ar[4] / 2);
  rez = min(rez, ar[1] / 2);
  cout << rez;
  return 0;
}
