#include <bits/stdc++.h>
using namespace std;
int main() {
  char ch[100001], ch1[10];
  int i = 0, j = 0, a[9] = {0};
  scanf("%s", ch);
  strcpy(ch1, "Bulbasaur");
  while (ch[i]) {
    for (j = 0; j < 9; j++)
      if (ch[i] == ch1[j]) {
        a[j]++;
        break;
      }
    i++;
  }
  a[1] /= 2;
  a[4] /= 2;
  j = 100000;
  a[6] = 100000;
  a[7] = 100000;
  for (i = 0; i < 9; i++) {
    if (a[i] < j) j = a[i];
  }
  cout << j;
  return 0;
}
