#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
const int N = 2e5 + 100;
const int MAX = 1e9 + 1;
int mp[52];
int main() {
  int i, j;
  string s;
  cin >> s;
  for (i = 0; i < s.size(); ++i) {
    if (s[i] >= 'a' && s[i] <= 'z')
      ++mp[s[i] - 'a'];
    else
      ++mp[s[i] - 'A' + 26];
  }
  cout << min(mp[27], min(mp['u' - 'a'] >> 1,
                          min(mp['l' - 'a'],
                              min(mp[1], min(mp[0] >> 1, min(mp['s' - 'a'],
                                                             mp['r' - 'a']))))))
       << endl;
  return 0;
}
