#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans = INT_MAX;
  char W[100001];
  scanf("%100000s", W);
  string s = W, t = "Bulbasaur";
  map<char, int> I, M;
  for (char ch : t) ++I[ch];
  for (char ch : s) ++M[ch];
  for (auto p : I) {
    ans = min(ans, M[p.first] / p.second);
  }
  printf("%d", ans);
}
