#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  int a[7];
  memset(a, 0, sizeof(a));
  cin >> str;
  for (int i = 0; str[i] != '\0'; i++) {
    switch (str[i]) {
      case 'B':
        a[0]++;
        break;
      case 'u':
        a[1]++;
        break;
      case 'l':
        a[2]++;
        break;
      case 'b':
        a[3]++;
        break;
      case 'a':
        a[4]++;
        break;
      case 's':
        a[5]++;
        break;
      case 'r':
        a[6]++;
        break;
    }
  }
  a[1] = a[1] / 2;
  a[4] = a[4] / 2;
  sort(a, a + 7);
  cout << a[0] << endl;
  return 0;
}
