#include<stdio.h>
#include<string.h>
int main(){
int i,j;
char ch;
char a[100005];
int b[256]={0};
while((ch=getchar())!=EOF){
b[ch]++;
}
char *d=”ulbasr”;
int min=b[‘B’];
b[‘u’]=b[‘u’]/2;
b[‘a’]=b[‘a’]/2;
for(i=0;i<strlen(d);i++){
if(min>b[d[i]]){
min=b[d[i]];
}
}
printf(“%d”,min);
}