#include <bits/stdc++.h>
using namespace std;
int a[7];
int main() {
  string s;
  cin >> s;
  int t = s.length();
  for (int i = 0; i < t; i++) {
    if (s[i] == 'B') a[0]++;
    if (s[i] == 'u') a[1]++;
    if (s[i] == 'l') a[2]++;
    if (s[i] == 'a') a[3]++;
    if (s[i] == 's') a[4]++;
    if (s[i] == 'r') a[5]++;
    if (s[i] == 'b') a[6]++;
  }
  a[1] = a[1] / 2;
  a[3] = a[3] / 2;
  sort(a, a + 7);
  cout << a[0];
  return 0;
}
