#include <bits/stdc++.h>
using namespace std;
map<char, int> skew;
int main() {
  string s, s2 = "Bulbasr";
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    skew[s[i]]++;
  }
  int ans = 1000000;
  skew['u'] /= 2;
  skew['a'] /= 2;
  for (int i = 0; i < s2.size(); i++) {
    ans = min(skew[s2[i]], ans);
  }
  printf("%d\n", ans);
  return 0;
}
