#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000000;
const int mod = 1000000007;
const int sze = 100005;
int cnt[70];
char str[sze];
string wh = "Bulbasaur";
int main() {
  scanf("%s", str);
  int len = strlen(str);
  int i, j;
  memset(cnt, 0, sizeof(cnt));
  for (i = 0; i < len; i++) {
    if (str[i] >= 'A' && str[i] <= 'Z') {
      cnt[str[i] - 'A']++;
    } else {
      cnt[str[i] - 'a' + 26]++;
    }
  }
  cnt[26] = cnt[26] / 2;
  cnt['u' - 'a' + 26] = cnt['u' - 'a' + 26] / 2;
  int minn = inf;
  int sz = wh.size();
  int id;
  for (i = 0; i < sz; i++) {
    if (wh[i] >= 'A' && wh[i] <= 'Z') {
      id = wh[i] - 'A';
    } else {
      id = wh[i] - 'a' + 26;
    }
    minn = min(minn, cnt[id]);
  }
  printf("%d\n", minn);
  return 0;
}
