#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int i, b, c, d, e, c1 = 0, c2 = 0, c3 = 0, c4 = 0, c5 = 0, c6 = 0, c7 = 0,
                     arr[500];
  for (i = 0; i < s.length(); i++) {
    if (s[i] == 'B')
      c1++;
    else if (s[i] == 'u')
      c2++;
    else if (s[i] == 'l')
      c3++;
    else if (s[i] == 'b')
      c4++;
    else if (s[i] == 's')
      c5++;
    else if (s[i] == 'r')
      c6++;
    else if (s[i] == 'a')
      c7++;
  }
  if (c2 % 2 != 0) {
    b = c2 / 2 + 1;
    c = c2 / 2;
  } else {
    b = c2 / 2;
    c = c2 / 2;
  }
  if (c7 % 2 != 0) {
    d = c7 / 2 + 1;
    e = c7 / 2;
  } else {
    d = c7 / 2;
    e = c7 / 2;
  }
  arr[0] = c1;
  arr[1] = b;
  arr[2] = c;
  arr[3] = c3;
  arr[4] = c4;
  arr[5] = c5, arr[6] = c6, arr[7] = d, arr[8] = e;
  ;
  sort(arr, arr + 9);
  cout << arr[0] << endl;
}
