import std.algorithm;
import std.range;
import std.stdio;
import std.string;

immutable string str = "Bulbasaur";

void main ()
{
	string s;
	while ((s = readln.strip) != "")
	{
		int [256] num;
		foreach (char c; s)
		{
			num[c] += 1;
		}
		int res = int.max;
		foreach (char c; str)
		{
			int d = cast (int) (str.count (c));
			res = min (res, num[c] / d);
		}
		writeln (res);
	}
}
