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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.StringTokenizer;

public class CF757A {



		public static void main(String args[]){
			InputReader in = new InputReader(System.in);
			//OutputStream outputStream = System.out;
			PrintWriter out = new PrintWriter(System.out);
			String s=in.nextLine();
			int ar[]=new int[7];
			char car[]=s.toCharArray();
			int l=car.length;
			char arx[]={'a','u','B','b','l','r','s'};
			for(int i=0;i<l;i++)
			{
				for(int j=0;j<7;j++)
				{
					if(car[i]==arx[j])
						ar[j]++;
				}
			}
			ar[0]=ar[0]/2;
			ar[1]=ar[1]/2;
			Arrays.sort(ar);
			out.println(ar[0]);
			out.close();
			
	}
		int sieveOfEratosthenes(int n)
	    {
	        // Create a boolean array "prime[0..n]" and initialize
	        // all entries it as true. A value in prime[i] will
	        // finally be false if i is Not a prime, else true.
	        boolean prime[] = new boolean[n+1];
	        for(int i=0;i<n;i++)
	            prime[i] = true;
	         
	        for(int p = 2; p*p <=n; p++)
	        {
	            // If prime[p] is not changed, then it is a prime
	            if(prime[p] == true)
	            {
	                // Update all multiples of p
	                for(int i = p*2; i <= n; i += p)
	                    prime[i] = false;
	            }
	        }
	        int c=0;
	        for(int i = 2; i <= n; i++)
	        {
	            if(prime[i] == true)
	                c++;
	        }
	        return c; 
	        // Print all prime numbers
	       /* for(int i = 2; i <= n; i++)
	        {
	            if(prime[i] == true)
	                System.out.print(i + " ");
	        }*/
	    }
	static class Pair implements Comparable<Pair> {
		int u;
		int v;
		BigInteger bi;
		public Pair(int u, int v) {
			this.u = u;
			this.v = v;
		}

		public int hashCode() {
			int hu = (int) (u ^ (u >>> 32));
			int hv = (int) (v ^ (v >>> 32));
			return 31 * hu + hv;
		}

		public boolean equals(Object o) {
			Pair other = (Pair) o;
			return u == other.u && v == other.v;
		}

		public int compareTo(Pair other) {
			return Long.compare(u, other.u) != 0 ? Long.compare(u, other.u) : Long.compare(v, other.v);
		}

		public String toString() {
			return "[u=" + u + ", v=" + v + "]";
		}
	}
	public static void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}
	static long modulo(long a,long b,long c) {
		long x=1;
		long y=a;
		while(b > 0){
			if(b%2 == 1){
				x=(x*y)%c;
			}
			y = (y*y)%c; // squaring the base
			b /= 2;
		}
		return  x%c;
	}
	public static long getClosestK(long[] a, long x) {

	    int low = 0;
	    int high = a.length - 1;

	    while (low <= high) {
	        int mid = (low + high) / 2;

	        // test lower case
	        if (mid == 0) {
	            if (a.length == 1) {
	                return a[0];
	            }

	            return Math.min(Math.abs(a[0] - x), Math.abs(a[1] - x)) + x;
	        }


	        // test upper case
	        if (mid == a.length - 1) {
	            return a[a.length - 1];
	        }

	        // test equality
	        if (a[mid] == x || a[mid + 1] == x) {
	            return x;
	        }


	        // test perfect range.
	        if (a[mid] < x  && a[mid + 1] > x) {
	            return Math.min(Math.abs(a[mid] - x), Math.abs(a[mid + 1] - x)) + x;
	        }

	        // keep searching.
	        if (a[mid] < x) {
	            low = mid + 1;
	        } else { 
	            high = mid;
	        }
	    }

	    throw new IllegalArgumentException("The array cannot be empty");
	}
	long factorial(long n,long M)
	{
	    long ans=1;
	    while(n>=1)
	    {
	        ans=(ans*n)%M;
	        n--;
	    }
	    return ans;
	}
	static long gcd(long x, long y)
	{
		if(x==0)
			return y;
		if(y==0)
			return x;
		long r=0, a, b;
		a = (x > y) ? x : y; // a is greater number
		b = (x < y) ? x : y; // b is smaller number
		r = b;
		while(a % b != 0)
		{
			r = a % b;
			a = b;
			b = r;
		}
		return r;
	}
	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream inputstream) {
			reader = new BufferedReader(new InputStreamReader(inputstream));
			tokenizer = null;
		}

		public String nextLine(){
			String fullLine=null;
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					fullLine=reader.readLine();
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
				return fullLine;
			}
			return fullLine;
		}
		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
	}
}
