#include <bits/stdc++.h>
using namespace std;
map<char, int> frq, frq2;
string s, str = "Bulbasaur";
int main() {
  while (cin >> s) {
    int i, j, ans = s.size();
    for (i = 0; i <= 8; i++) frq[str[i]]++;
    for (i = 0; i < s.size(); i++) frq2[s[i]]++;
    for (i = 0; i <= 8; i++) ans = min(ans, frq2[str[i]] / frq[str[i]]);
    cout << ans << '\n';
    frq.clear();
    frq2.clear();
  }
  return 0;
}
