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