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.*;
public class Practice{
	static long mod=(long)Math.pow(10,9)+7;
	static final int lint=Integer.MAX_VALUE;
	static final double ldouble=Double.MAX_VALUE;
	public static void main(String args[]) {
        new Thread(null, new Runnable() {
            public void run() {
                try{
                    solve();
                }
                catch(Exception e){
                    e.printStackTrace();
                }
            }
        }, "1", 1 << 26).start();
	}
	public static void solve(){
		InputReader in = new InputReader(System.in);
        PrintWriter w = new PrintWriter(System.out);
        String str=in.nextLine();
        int map[]=new int[7];
        for(int i=0;i<str.length();i++){
        	if(str.charAt(i)=='B'){
        		map[0]++;
        	}
        	if(str.charAt(i)=='u'){
        		map[1]++;
        	}
        	if(str.charAt(i)=='l'){
        		map[2]++;
        	}
        	if(str.charAt(i)=='b'){
        		map[3]++;
        	}
        	if(str.charAt(i)=='a'){
        		map[4]++;
        	}
        	if(str.charAt(i)=='s'){
        		map[5]++;
        	}
        	if(str.charAt(i)=='r'){
        		map[6]++;
        	}
        }
        map[1]=map[1]/2;
        map[4]=map[4]/2;
        Arrays.sort(map);
        w.println(map[0]);
        w.close();
	}
	
//	static boolean nextPermutation() {
//	    // Find longest non-increasing suffix
//	    int i = array.length - 1;
//	    while (i > 0 && array[i - 1] >= array[i])
//	        i--;
//	    // Now i is the head index of the suffix
//	    
//	    // Are we at the last permutation already?
//	    if (i <= 0)
//	        return false;
//	    
//	    // Let array[i - 1] be the pivot
//	    // Find rightmost element that exceeds the pivot
//	    int j = array.length - 1;
//	    while (array[j] <= array[i - 1])
//	        j--;
//	    // Now the value array[j] will become the new pivot
//	    // Assertion: j >= i
//	    
//	    // Swap the pivot with j
//	    char temp = array[i - 1];
//	    array[i - 1] = array[j];
//	    array[j] = temp;
//	    
//	    // Reverse the suffix
//	    j = array.length - 1;
//	    while (i < j) {
//	        temp = array[i];
//	        array[i] = array[j];
//	        array[j] = temp;
//	        i++;
//	        j--;
//	    }
//	    
//	    // Successfully computed the next permutation
//	    return true;
//	}
	static long power(long base, long exponent, long modulus){
	    long result = 1;
	    while (exponent > 0) {
	        if (exponent % 2 == 1)
	            result = (result * base) % modulus;
	        exponent = exponent >> 1;
	        base = (base * base) % modulus;
	    }
    	return result;
	}
	static boolean isPrime(int n) {
        if(n < 2) return false;
        if(n == 2 || n == 3) return true;
        if(n%2 == 0 || n%3 == 0) return false;	
        int sqrtN = (int)Math.sqrt(n)+1;
        for(int i = 6; i <= sqrtN; i += 6) {
            if(n%(i-1) == 0 || n%(i+1) == 0) return false;
        }
        return true;
    }
	static long modpowIter(long a, long b) {
        long ans=1;
        while(b != 0) {
                if(b%2==1)
                	ans=(ans*a)%mod;
                a=(a*a)%mod;
                b=b>>1;
        }
        return ans;
	}
	static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, numChars;
        private SpaceCharFilter filter;
 
        public InputReader(InputStream stream) {
            this.stream = stream;
        }
        
        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }
 
        public String nextLine() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }
 
        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
 
        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
 
        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
 
        public int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }
 
        public long[] nextLongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }
 
        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);
        }
	}
} 