#include <bits/stdc++.h>
using namespace std;
string B = "Bulbasaur";
int cnt[256];
int ans;
void dec(char c) {
  cnt[c]--;
  if (cnt[c] >= 0) return;
  printf("%d\n", ans);
  exit(0);
}
int main() {
  string s;
  cin >> s;
  for (char c : s) cnt[c]++;
  while (true) {
    for (char c : B) dec(c);
    ans++;
  }
  return 0;
}
