A. Gotta Catch Em' All!
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

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. .

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".

 #include<iostream>
using namespace std;
int f[];
int main(){
string s;
cin>>s;
for(int i=;i<s.size();i++)
f[s[i]]++;
int ans;
ans=min(f['B'],min(f['u']/,min(f['l'],min(f['b'],min(f['a']/,min(f['s'],f['r']))))));
cout<<ans;
}

最新文章

  1. css sprite 调整大张图片中小图标的大小
  2. 【Maven】运行项目
  3. iOS开发masonry的一些使用简介
  4. 微信支付之扫码支付开发:我遇到的坑及解决办法(附:Ecshop 微信支付插件)
  5. sql2000添加表注释,列注释 及修改 删除 注释
  6. 第3章 System V IPC
  7. C++之vector中元素删除
  8. SCOM随笔
  9. node配置运行环境变量;
  10. navicat for mysql 显示中文乱码解决办法
  11. 使用Atlas进行元数据管理之Atlas简介
  12. [TJOI2017]DNA
  13. kafka的一些参数
  14. pagex/y offsetx/y screenx/y clientx/y 用法及区别
  15. C# 本进程执行完毕后再执行下一线程
  16. linux_压缩解压命令(zip/tar)
  17. VMWare共有3种网络连接模式
  18. ubuntu shell脚本出错 dash
  19. @one to many 和 @many to one小例子
  20. Spring框架的事务管理之声明式事务管理的类型

热门文章

  1. webpack(2)--Entry
  2. Python Flask 多环境配置
  3. 关于THINKPHP5模型关联的初步理解
  4. 1_Utilities__bandwidthTest
  5. bootstrap修改勾选样式
  6. $.ajax的重写
  7. python 安装mysqldb组件
  8. RISC处理器
  9. 将Ctrl+Alt+Delete键进行屏蔽,防止误操作重启服务器
  10. intellij idea 的常见配置