#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  char a[100100];
  cin >> a;
  int b[7] = {0};
  int i;
  for (i = 0; i < strlen(a); i++) {
    if (a[i] == 'B')
      b[0]++;
    else if (a[i] == 'l')
      b[1]++;
    else if (a[i] == 'b')
      b[2]++;
    else if (a[i] == 's')
      b[3]++;
    else if (a[i] == 'r')
      b[4]++;
    else if (a[i] == 'a')
      b[5]++;
    else if (a[i] == 'u')
      b[6]++;
  }
  int ans = 100100;
  for (i = 0; i < 7; i++) {
    if (i >= 5) {
      ans = min(ans, b[i] / 2);
    } else
      ans = min(ans, b[i]);
  }
  cout << ans << " ";
  return 0;
}
