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