407964: GYM102953 1 Banner Display

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

1. Banner Displaytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

You're trying to make several banners that say "coderams" on them, for an upcoming in-person coding competition. However, you have a limited number of letter stickers that you can use. All you have is a long string of $$$n$$$ lowercase letter stickers. Given this, your task is to figure out the maximum possible number of complete banners (that say "coderams" on them, not just part of the string), given the letter stickers that you have.

Input

The first line of input consists of a single positive integer $$$n$$$ $$$(1 <= n <= 10^5)$$$: the number of letter stickers that you have.

The next line consists of a single $$$n$$$-character string, each character representing the letter of one sticker that you have. All stickers will have lowercase letters on them.

Output

Output the number of complete banners that you can make with the letter stickers you have.

Scoring

Full problem: 6 points

ExamplesInput
18
arcmodessmarcodarc
Output
1
Input
4
code
Output
0
Input
32
ramscodecoderamsramscodecoderams
Output
4

加入题单

算法标签: