#include <bits/stdc++.h>
using namespace std;
int main() {
  string FindBul;
  string Bulbasr = " Bulbasr";
  int arr[8];
  int cnter = 0;
  cin >> FindBul;
  for (int i = 0; i <= 7; i++) {
    arr[i] = 0;
  }
  for (int i = 0; i < FindBul.size(); i++) {
    for (int i2 = 1; i2 <= 7; i2++) {
      if (Bulbasr[i2] == FindBul[i]) {
        arr[i2]++;
        break;
      }
    }
    if (arr[1] >= 1 && arr[2] >= 2 && arr[3] >= 1 && arr[4] >= 1 &&
        arr[5] >= 2 && arr[6] >= 1 && arr[7] >= 1) {
      arr[1]--;
      arr[2]--;
      arr[3]--;
      arr[4]--;
      arr[5]--;
      arr[6]--;
      arr[7]--;
      arr[2]--;
      arr[5]--;
      cnter++;
    }
  }
  cout << cnter;
  return 0;
}
