#include <bits/stdc++.h>
using namespace std;
bool pr[1000007];
void sieve() {
  pr[0] = 1;
  pr[1] = 1;
  for (int i = 2; i < sqrt(1000007); i++) {
    for (int j = 2 * i; j <= 1000007; j += i) {
      pr[j] = 1;
    }
  }
}
long long fashtpower(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x;
    res %= 1000000007;
    y = y >> 1;
    x = x * x;
    x %= 1000000007;
  }
  return res;
}
unsigned long long lopow(long long x, long long y) {
  unsigned long long res = 1ULL;
  while (y) {
    if (y & 1) res *= (unsigned long long)x;
    y >>= 1;
    x *= x;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  int n = s.length();
  long long oc[150] = {0};
  for (int i = 0; i < n; i++) {
    oc[s[i]]++;
  }
  oc[97] /= 2;
  oc[int('u')] /= 2;
  long long ans = 100000000000000;
  for (int i = 0; i < 150; i++) {
    if (i == 66 || i == int('u') || i == int('l') || i == int('b') ||
        i == int('a') || i == int('s') || i == int('r')) {
      ans = min(ans, oc[i]);
    }
  }
  cout << ans;
}
