#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  string t;
  cin >> t;
  int B(0), b(0), a(0), u(0), l(0), s(0), r(0);
  for (int i(0); i < t.size(); ++i) {
    if (t[i] == 'B')
      B++;
    else if (t[i] == 'b')
      b++;
    else if (t[i] == 'a')
      a++;
    else if (t[i] == 'u')
      u++;
    else if (t[i] == 'l')
      l++;
    else if (t[i] == 's')
      s++;
    else if (t[i] == 'r')
      r++;
  }
  a /= 2, u /= 2;
  int ans(100000);
  ans = min(ans, B);
  ans = min(ans, b);
  ans = min(ans, a);
  ans = min(ans, u);
  ans = min(ans, l);
  ans = min(ans, s);
  ans = min(ans, r);
  cout << ans;
  return 0;
}
