#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int B1 = 0, u1 = 0, l1 = 0, b1 = 0, a1 = 0, s1 = 0, r1 = 0;
  string s;
  cin >> s;
  for (long long int i = 0; i < s.length(); i++) {
    if (s[i] == 'B') {
      B1++;
    } else if (s[i] == 'u') {
      u1++;
    } else if (s[i] == 'l') {
      l1++;
    } else if (s[i] == 'b') {
      b1++;
    } else if (s[i] == 'a') {
      a1++;
    } else if (s[i] == 's') {
      s1++;
    } else if (s[i] == 'r') {
      r1++;
    }
  }
  a1 = a1 / 2;
  u1 = u1 / 2;
  long long int arr[7];
  arr[0] = B1;
  arr[1] = u1;
  arr[2] = l1;
  arr[3] = b1;
  arr[4] = a1;
  arr[5] = s1;
  arr[6] = r1;
  sort(arr, arr + 7);
  cout << arr[0] << "\n";
  return 0;
}
