#include <bits/stdc++.h>
char s[100001];
int A[8];
int main() {
  scanf("%s", s);
  int n;
  n = strlen(s);
  int i;
  for (i = 0; i < n; i++) {
    if (s[i] - 'B' == 0) A[0]++;
    if (s[i] - 'u' == 0) A[1]++;
    if (s[i] - 'l' == 0) A[2]++;
    if (s[i] - 'b' == 0) A[3]++;
    if (s[i] - 'a' == 0) A[4]++;
    if (s[i] - 's' == 0) A[5]++;
    if (s[i] - 'r' == 0) A[6]++;
  }
  A[1] = A[1] / 2;
  A[3] = A[3];
  A[4] = A[4] / 2;
  int k = A[0];
  for (i = 0; i < 7; i++) {
    if (A[i] < k) k = A[i];
  }
  printf("%d\n", k);
  return 0;
}
