#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const double pi = acos(-1.0);
const int maxn = 1e5 + 5;
int i, j, k, l, n, m, x, y, z;
char s[maxn];
string ss = "Bulbsar";
int a[8];
int main() {
  scanf("%s", s);
  n = strlen(s) - 1;
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= 6; j++)
      if (s[i] == ss[j]) a[j]++;
  }
  a[5] /= 2;
  a[1] /= 2;
  x = 2147483647;
  for (int i = 0; i <= 6; i++) x = min(x, a[i]);
  cout << x << endl;
}
