Bash wants to become a Pokemon master one day. Although he liked a lot of Pokemon, he has always been fascinated by Bulbasaur the most. Soon, things started getting serious and his fascination turned into an obsession. Since he is too young to go out and catch Bulbasaur, he came up with his own way of catching a Bulbasaur.

Each day, he takes the front page of the newspaper. He cuts out the letters one at a time, from anywhere on the front page of the newspaper to form the word "Bulbasaur" (without quotes) and sticks it on his wall. Bash is very particular about case — the first letter of "Bulbasaur" must be upper case and the rest must be lower case. By doing this he thinks he has caught one Bulbasaur. He then repeats this step on the left over part of the newspaper. He keeps doing this until it is not possible to form the word "Bulbasaur" from the newspaper.

Given the text on the front page of the newspaper, can you tell how many Bulbasaurs he will catch today?

Note: uppercase and lowercase letters are considered different.

Input

Input contains a single line containing a string s (1 ≤ |s| ≤ 105) — the text on the front page of the newspaper without spaces and punctuation marks. |s| is the length of the string s.

The string s contains lowercase and uppercase English letters, i.e. <image>.

Output

Output a single integer, the answer to the problem.

Examples

Input

Bulbbasaur


Output

1


Input

F


Output

0


Input

aBddulbasaurrgndgbualdBdsagaurrgndbb


Output

2

Note

In the first case, you could pick: Bulbbasaur.

In the second case, there is no way to pick even a single Bulbasaur.

In the third case, you can rearrange the string to BulbasaurBulbasauraddrgndgddgargndbb to get two words "Bulbasaur".
import java.util.*;
import java.io.*;
import java.math.BigInteger;

public class Monk {

	public static int mod = 1000000007;

	public static void main(String[] args) {

		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int t = 1;
		while (t-- > 0) {
			HashSet<Character> h1 = new HashSet<Character>();
			h1.add('B');
			h1.add('u');
			h1.add('l');
			h1.add('b');
			h1.add('a');
			h1.add('s');
			h1.add('r');
			String ss = in.readString();
			hm = new HashMap<Character, Integer>();
			for (int i = 0; i < ss.length(); i++) {

				char c = ss.charAt(i);
				if (h1.contains(c)) {
					add(c);
				}
			}
			int ans=0;
			if(hm.containsKey('B') && hm.size()==7)
			{
			 ans = hm.get('B');
			}
			
			for (int i = 0; i < 26; i++) {
				char c = (char) (i + 'a');
				if (h1.contains(c) && hm.containsKey(c)) {
					if (c == 'u'  || c == 'a' )
						ans = Math.min(hm.get(c) / 2, ans);
					else
						ans = Math.min(hm.get(c), ans);

				}
			}
			out.println(ans);
		}

		out.close();
	}

	static HashMap<Character, Integer> hm;

	static void add(char a) {
		if (hm.containsKey(a))
			hm.put(a, hm.get(a) + 1);
		else
			hm.put(a, 1);
	}

	static class Pair implements Comparable<Pair> {
		String s;
		int x;
		int y;

		Pair(String st, int xx, int yy) {
			x = xx;
			y = yy;
			s = st;

		}

		public int compareTo(Pair o) {
			if (Long.compare(this.x, o.x) != 0)
				return Long.compare(this.x, o.x);
			else
				return Long.compare(this.y, o.y);
		}
	}

	static final int multiplier = 43;

	public static class Hashing {

		static final int multiplier = 43;
		// static final Random rnd = new Random();
		static final int mod1 = (int) 1e9 + 5;
		static final int mod2 = (int) 1e9 + 9;
		static final int invMultiplier2 = 139534885;
		static final int invMultiplier1 = 325581397;

		long[] hash1, hash2;
		long[] inv1, inv2;
		int n;
		String st;

		public Hashing(String s) {
			n = s.length();
			hash1 = new long[n + 1];
			hash2 = new long[n + 1];
			inv1 = new long[n + 1];
			inv2 = new long[n + 1];
			inv1[0] = 1;
			inv2[0] = 1;
			st = s;
			long p1 = 1;
			long p2 = 1;
			for (int i = 0; i < n; i++) {
				hash1[i + 1] = (hash1[i] + s.charAt(i) * p1) % mod1;
				p1 = p1 * multiplier % mod1;
				inv1[i + 1] = inv1[i] * invMultiplier1 % mod1;
				/*
				 * hash2[i + 1] = (hash2[i] + s.charAt(i) * p2) % mod2; p2 = p2
				 * * multiplier % mod2; inv2[i + 1] = inv2[i] * invMultiplier2 %
				 * mod2;
				 */
			}
			// System.out.println(invMultiplier2+" "+invMultiplier1);
		}

		public long getHash(int l, int r) {
			if (r > n || l <= 0 || l > r)
				return -1;
			return (((hash1[r] - hash1[l - 1] + mod1) * inv1[l] % mod1) << 32)
					+ (hash2[r] - hash2[l - 1] + mod2) * inv2[l] % mod2;
		}
	}

	public static long gcd(long x, long y) {
		if (x % y == 0)
			return y;
		else
			return gcd(y, x % y);
	}

	public static int gcd(int x, int y) {
		if (x % y == 0)
			return y;
		else
			return gcd(y, x % y);
	}

	public static int abs(int a, int b) {
		return (int) Math.abs(a - b);
	}

	public static long abs(long a, long b) {
		return (long) Math.abs(a - b);
	}

	public static int max(int a, int b) {
		if (a > b)
			return a;
		else
			return b;
	}

	public static int min(int a, int b) {
		if (a > b)
			return b;
		else
			return a;
	}

	public static long max(long a, long b) {
		if (a > b)
			return a;
		else
			return b;
	}

	public static long min(long a, long b) {
		if (a > b)
			return b;
		else
			return a;
	}

	public static long pow(long n, long p, long m) {
		long result = 1;
		if (p == 0)
			return 1;
		if (p == 1)
			return n;
		while (p != 0) {
			if (p % 2 == 1)
				result *= n;
			if (result >= m)
				result %= m;
			p >>= 1;
			n *= n;
			if (n >= m)
				n %= m;
		}
		return result;
	}

	public static long pow(long n, long p) {
		long result = 1;
		if (p == 0)
			return 1;
		if (p == 1)
			return n;
		while (p != 0) {
			if (p % 2 == 1)
				result *= n;
			p >>= 1;
			n *= n;
		}
		return result;
	}

	static class Compare implements Comparator {

		public int compare(Object o1, Object o2) {
			Pair p1 = (Pair) o1;
			Pair p2 = (Pair) o2;

			if (p1.y < p2.y) {
				return -1;
			} else if (p2.y > p2.y) {
				return 1;
			} else if (p1.y == p2.y) {
				if (p1.x > p2.x)
					return 1;
				else if (p1.x == p2.x)
					return 0;
				else
					return -1;
			}
			return 0;
		}
	}

	static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}
}
