CET and miniskirt
题号:NC200063
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Xuxu is a student who likes English and skirt.Therefore, he has spent a lot of time preparing for CET. CET is a very important test, which determines the style of Xuxu's skirt this year. 
Xuxu just finished the CET and got the standard answer after that. What's more , if Xuxu gets zero, he will wear a skirt to the party, otherwise he will wear a suit(which is very disappointing). So Xuxu wants to know if it is possible for him to wear a skirt to the party. But unfortunately, he only remembers how many A, B, C and D he has written. Can you tell him weather he can wear a skirt in the party ?

输入描述:

The first line contains an integer n which indicates the number of questions.
The second line contain a string s which indicates the answer of each question.The answer only contain the upper case letters 'A','B','C' and 'D'.
The third line contain four integer a,b,c,d indicates the number of A,B,C,D Xuxu has written.

输出描述:

If it's impossible for Xuxu to wear skirt, output the minimum number of questions Xuxu may answer correctly, Otherwise output "orz"
示例1

输入

复制
4
ABCD
1 1 1 1

输出

复制
orz

说明

It's possible to get a zero if Xuxu has written BADC in CET.
示例2

输入

复制
3
AAA
2 1 0 0

输出

复制
2

说明

It's impossible to get a zero and the minium number of question Xuxu can answer correctly is 2.

备注: