#include <bits/stdc++.h>
int main() {
  char inp[100000];
  int B, u, l, b, a, s, r;
  B = u = l = b = a = s = r = 0;
  scanf("%s", inp);
  for (int i = 0; i < strlen(inp); i++) {
    switch (inp[i]) {
      case 'B':
        B++;
        break;
      case 'u':
        u++;
        break;
      case 'l':
        l++;
        break;
      case 'b':
        b++;
        break;
      case 'a':
        a++;
        break;
      case 's':
        s++;
        break;
      case 'r':
        r++;
        break;
    }
  }
  int temp1 =
      b < a / 2 ? (b < u / 2 ? b : u / 2) : (a / 2 < u / 2 ? a / 2 : u / 2);
  int temp2 = B < l ? (B < s ? B : s) : (l < s ? l : s);
  printf("%d\n",
         temp1 < temp2 ? (temp1 < r ? temp1 : r) : (temp2 < r ? temp2 : r));
  return 0;
}
