#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
int upmin(T1 &x, T2 v) {
  if (x > v) {
    x = v;
    return 1;
  }
  return 0;
}
template <class T1, class T2>
int upmax(T1 &x, T2 v) {
  if (x < v) {
    x = v;
    return 1;
  }
  return 0;
}
const int INF = 0x3f3f3f3f;
string gg = "Bulbasaur";
int cnt[256];
void init() {
  for (int i = 0; i < gg.size(); ++i) {
    ++cnt[gg[i]];
  }
}
int acnt[256];
void preprocess() {
  string seq;
  cin >> seq;
  for (int i = 0; i < seq.size(); ++i) {
    ++acnt[seq[i]];
  }
  int ans = INF;
  set<char> st;
  for (int i = 0; i < gg.size(); ++i) {
    st.emplace(gg[i]);
  }
  for (auto x : st) {
    upmin(ans, acnt[x] / cnt[x]);
  }
  cout << ans << endl;
}
void solve() {}
signed main() {
  ios::sync_with_stdio(0);
  init();
  preprocess();
  solve();
  return 0;
}
