#include <bits/stdc++.h>
using namespace std;
int main() {
  int B = 0, u = 0, l = 0, b = 0, a = 0, s = 0, r = 0;
  string sk;
  cin >> sk;
  for (int i = 0; i < sk.size(); ++i) {
    if (sk[i] == 'B') ++B;
    if (sk[i] == 'b') ++b;
    if (sk[i] == 'l') ++l;
    if (sk[i] == 'u') ++u;
    if (sk[i] == 'r') ++r;
    if (sk[i] == 's') ++s;
    if (sk[i] == 'a') ++a;
  }
  int mn = B;
  mn = min(mn, b);
  mn = min(mn, l);
  mn = min(mn, u / 2);
  mn = min(mn, a / 2);
  mn = min(mn, r);
  mn = min(mn, s);
  cout << mn;
}
