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.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        ConsoleIO io = new ConsoleIO(new InputStreamReader(System.in), new PrintWriter(System.out));
        //ConsoleIO io = new ConsoleIO(new FileReader("D:\\fbhc\\fighting_the_zombie.txt"), new PrintWriter(new File("D:\\fbhc\\out.txt")));
        new Main(io).solve();
        io.close();
    }
    ConsoleIO io;
    Main(ConsoleIO io) {
        this.io = io;
    }

    long MOD = 1_000_000_007;
    int N, M, W, K, Q;

    public void solve() {
//        int n = io.ri();
//        int m = io.ri();
//
//        HashMap<Integer, List<Integer>> all = new HashMap<>();
//        //int[] proc = new int[m];
//        for(int i = 0;i<n;i++){
//            int g = io.ri();
//
//            for(int j = 0;j<g;j++){
//                int v = io.ri()-1;
//                //if(proc[v]<=i){
//                //    proc[v]=i+1;
//                    if(!all.containsKey(v))all.put(v, new ArrayList<>());
//                    all.get(v).add(i);
//                //}
//            }
//        }
//        int other = m - all.size();
//        long res = 1;
//        for(int i = 1;i<=other;i++){
//            res = (res*i)%MOD;
//        }
//        Queue<Bucket> queue = new LinkedList<>();
//        queue.add(new Bucket(0, new ArrayList<>(all.values())));
//        int[] cur = new int[n];
//        List<List<Integer>> aaa = new ArrayList<>();
//        for(int i = 0;i<n;i++)aaa.add(new ArrayList<>());
//        int iter = 0;
//        while(queue.size()>0) {
//            Bucket bucket = queue.remove();
//            List<List<Integer>> list = bucket.list;
//            int k = bucket.k;
//            long x = 1;
//            long y = 1;
//            List<Integer> toAdd = new ArrayList<>();
//            for (int i = 0; i < list.size(); i++) {
//                List<Integer> nums = list.get(i);
//                if (nums.size() <= k) {
//                    y  = (y*x)%MOD;
//                    x++;
//                } else {
//                    int v = nums.get(k);
//                    if(cur[v] <= iter){
//                        cur[v] = iter+1;
//                        aaa.set(v, new ArrayList<>());
//                        toAdd.add(v);
//                    }
//                    aaa.get(v).add(i);
//                }
//            }
//            for(int i = 0;i<toAdd.size();i++) {
//                int v = toAdd.get(i);
//                List<Integer> pp = aaa.get(v);
//                if (pp.size() > 1) {
//                    List<List<Integer>> next = new ArrayList<>();
//                    for (int j = 0; j < pp.size(); j++) next.add(list.get(pp.get(j)));
//                    queue.add(new Bucket(k + 1, next));
//                }
//            }
//            if (x > 1)
//                res = (res * y) % MOD;
//            iter++;
//        }
//        io.writeLine(res+"");

        char[] c = io.readLine().toCharArray();
        int[] map = new int[128];
        for(int i = 0;i<c.length;i++){
            map[c[i]]++;
        }
        //String s = "Bulbasaur";
        int res = map['B'];
        res = Math.min(res, map['u']/2);
        res = Math.min(res, map['l']);
        res = Math.min(res, map['b']);
        res = Math.min(res, map['a']/2);
        res = Math.min(res, map['s']);
        res = Math.min(res, map['r']);
        io.writeLine(res+"");
    }

    class Bucket{
        public Bucket (int _k, List<List<Integer>> _list){
            k = _k;
            list = _list;
        }
       public int k;
        List<List<Integer>> list;
    }

}

class ConsoleIO {
    BufferedReader br;
    PrintWriter out;
    public ConsoleIO(Reader reader, PrintWriter writer){br = new BufferedReader(reader);out = writer;}
    public void flush(){this.out.flush();}
    public void close(){this.out.close();}
    public void writeLine(String s) {this.out.println(s);}
    public void writeInt(int a) {this.out.print(a);this.out.print(' ');}
    public void writeWord(String s){
        this.out.print(s);
    }
    public void writeIntArray(int[] a, int k, String separator) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < k; i++) {
            if (i > 0) sb.append(separator);
            sb.append(a[i]);
        }
        this.writeLine(sb.toString());
    }
    public int read(char[] buf, int len){try {return br.read(buf,0,len);}catch (Exception ex){ return -1; }}
    public String readLine() {try {return br.readLine();}catch (Exception ex){ return "";}}
    public long[] readLongArray() {
        String[]n=this.readLine().trim().split("\\s+");long[]r=new long[n.length];
        for(int i=0;i<n.length;i++)r[i]=Long.parseLong(n[i]);
        return r;
    }
    public int[] readIntArray() {
        String[]n=this.readLine().trim().split("\\s+");int[]r=new int[n.length];
        for(int i=0;i<n.length;i++)r[i]=Integer.parseInt(n[i]);
        return r;
    }
    public int[] readIntArray(int n) {
        int[] res = new int[n];
        char[] all = this.readLine().toCharArray();
        int cur = 0;boolean have = false;
        int k = 0;
        boolean neg = false;
        for(int i = 0;i<all.length;i++){
            if(all[i]>='0' && all[i]<='9'){
                cur = cur*10+all[i]-'0';
                have = true;
            }else if(all[i]=='-') {
                neg = true;
            }
            else if(have){
                res[k++] = neg?-cur:cur;
                cur = 0;
                have = false;
                neg = false;
            }
        }
        if(have)res[k++] = neg?-cur:cur;
        return res;
    }
    public int ri() {
        try {
            int r = 0;
            boolean start = false;
            boolean neg = false;
            while (true) {
                int c = br.read();
                if (c >= '0' && c <= '9') {
                    r = r * 10 + c - '0';
                    start = true;
                } else if (!start && c == '-') {
                    start = true;
                    neg = true;
                } else if (start || c == -1) return neg ? -r : r;
            }
        } catch (Exception ex) {
            return -1;
        }
    }
    public long readLong() {
        try {
            long r = 0;
            boolean start = false;
            boolean neg = false;
            while (true) {
                int c = br.read();
                if (c >= '0' && c <= '9') {
                    r = r * 10 + c - '0';
                    start = true;
                } else if (!start && c == '-') {
                    start = true;
                    neg = true;
                } else if (start || c == -1) return neg ? -r : r;
            }
        } catch (Exception ex) {
            return -1;
        }
    }
    public String readWord() {
        try {
            boolean start = false;
            StringBuilder sb = new StringBuilder();
            while (true) {
                int c = br.read();
                if (c!= ' ' && c!= '\r' && c!='\n' && c!='\t') {
                    sb.append((char)c);
                    start = true;
                } else if (start || c == -1) return sb.toString();
            }
        } catch (Exception ex) {
            return "";
        }
    }
    public char readSymbol() {
        try {
            while (true) {
                int c = br.read();
                if (c != ' ' && c != '\r' && c != '\n' && c != '\t') {
                    return (char) c;
                }
            }
        } catch (Exception ex) {
            return 0;
        }
    }
    public char readChar(){try {return (char)br.read();}catch (Exception ex){ return 0; }}
}