#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, x, y, z;
  map<int, int> m;
  for (x = 0; x < 300; x++) m[x] = 0;
  string s;
  cin >> s;
  for (x = 0; x < s.size(); x++) {
    if (s[x] == 'B')
      m['B']++;
    else if (s[x] == 'u')
      m['u']++;
    else if (s[x] == 'l')
      m['l']++;
    else if (s[x] == 'b')
      m['b']++;
    else if (s[x] == 'a')
      m['a']++;
    else if (s[x] == 's')
      m['s']++;
    else if (s[x] == 'r')
      m['r']++;
  }
  if (m['u'] != 0) m['u'] = m['u'] / 2;
  if (m['a'] != 0) m['a'] = m['a'] / 2;
  cout << min(m['B'],
              min(m['u'],
                  min(m['l'], min(m['b'], min(m['a'], min(m['s'], m['r']))))))
       << endl;
  return 0;
}
