#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  vector<int> bulb(7, 0);
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'B')
      bulb[0]++;
    else if (s[i] == 'u')
      bulb[1]++;
    else if (s[i] == 'l')
      bulb[2]++;
    else if (s[i] == 'b')
      bulb[3]++;
    else if (s[i] == 'a')
      bulb[4]++;
    else if (s[i] == 's')
      bulb[5]++;
    else if (s[i] == 'r')
      bulb[6]++;
  }
  bulb[1] /= 2;
  bulb[4] /= 2;
  int min = 0;
  for (int i = 1; i < 7; i++) {
    if (bulb[i] < bulb[min]) min = i;
  }
  cout << bulb[min];
  return 0;
}
