#include <bits/stdc++.h>
using namespace std;
const int MXN = 1e5 + 1;
const int MAXN = 1e3 + 1;
const long long INF = 1e16;
const int MOD = 65000;
const int MAX = 1e2;
const double EPS = 1e-9;
long long n;
long long a, b, c, d, e, first, g, h;
int main() {
  ios_base::sync_with_stdio(0);
  string second;
  cin >> second;
  for (int i = 0; i < second.size(); ++i) {
    if (second[i] == 'B') ++a;
    if (second[i] == 'u') ++b;
    if (second[i] == 'l') ++c;
    if (second[i] == 'b') ++d;
    if (second[i] == 'a') ++e;
    if (second[i] == 's') ++first;
    if (second[i] == 'u') ++g;
    if (second[i] == 'r') ++h;
  }
  g = g / 2;
  e = e / 2;
  cout << min(a, min(b, min(c, min(d, min(e, min(first, min(g, h)))))));
  return 0;
}
