#include <bits/stdc++.h>
using namespace std;
int A[26];
int B[26];
int main() {
  int i, j, k, n;
  string s;
  cin >> s;
  for (i = 0; i < s.length(); i++) {
    if (s[i] <= 'Z' && s[i] >= 'A')
      A[s[i] - 'A']++;
    else
      B[s[i] - 'a']++;
  }
  B['u' - 'a'] /= 2;
  B['a' - 'a'] /= 2;
  int ans = 1000000;
  ans = min(ans, A[1]);
  ans = min(ans, B['u' - 'a']);
  ans = min(ans, B['s' - 'a']);
  ans = min(ans, B['l' - 'a']);
  ans = min(ans, B['b' - 'a']);
  ans = min(ans, B['a' - 'a']);
  ans = min(ans, B['r' - 'a']);
  cout << ans;
  return 0;
}
