#include <bits/stdc++.h>
using namespace std;
int _I() {
  int x;
  scanf("%d", &x);
  return x;
}
int prime[1000001] = {0};
vector<int> pp, ff[1001];
void sv() {
  int i, j;
  pp.push_back(2);
  for (i = 4; i <= 1000000; i += 2) prime[i] = 1;
  for (i = 3; i <= 1000000; i += 2) {
    if (!prime[i]) {
      pp.push_back(i);
      for (j = i * 3; j <= 1000000; j += i + i) prime[j] = 1;
    }
  }
  prime[0] = prime[1] = 1;
}
map<int, int> mymap;
void solve() {
  string s;
  cin >> s;
  int sz = s.size();
  int ar[11] = {0};
  for (int i = 0; i < sz; i++) {
    if (s[i] == 'a') ar[0]++;
    if (s[i] == 'b') ar[1]++;
    if (s[i] == 'l') ar[2]++;
    if (s[i] == 's') ar[3]++;
    if (s[i] == 'u') ar[4]++;
    if (s[i] == 'r') ar[5]++;
    if (s[i] == 'B') ar[6]++;
  }
  ar[4] = ar[4] / 2;
  ar[0] = ar[0] / 2;
  int mn = INT_MAX;
  for (int i = 0; i < 7; i++) {
    mn = min(mn, ar[i]);
  }
  printf("%d\n", mn);
}
int main() {
  solve();
  return 0;
}
