#include <bits/stdc++.h>
using namespace std;
int n, m, ans;
char s[100005];
char t[100005];
int cnt[100005];
int main() {
  strcpy(t, "auBlbsr");
  gets(s);
  n = strlen(s), m = strlen(t);
  for (int j = 0; j < m; j++) {
    for (int i = 0; i < n; i++) {
      if (s[i] == t[j]) cnt[j]++;
    }
  }
  ans = min(cnt[0], cnt[1]) / 2;
  for (int i = 2; i < m; i++) ans = min(ans, cnt[i]);
  printf("%d\n", ans);
}
