from collections import deque
from decimal import *

cr = 0
itms = deque()

n = int(input())
array =  input().split()
p = Decimal(array[0])
q = Decimal(array[1])
r = Decimal(array[2])
s = input()

def gnt():
    global cr
    global s
    if cr == len(s):
        return 0
    if s[cr] == '(':
        cr = cr + 1
        return '('
    elif s[cr] == ')':
        cr = cr + 1
        return ')'
    elif s[cr] == ' ':
        cr = cr + 1
        return gnt()
    elif s[cr] == 'Y':
        cr = cr + 3
        return 'Y'
    elif s[cr] == 'N':
        cr = cr + 2
        return 'N'
    elif s[cr] == 'r':
        cr = cr + 6
        return 'r'
    elif s[cr] == 'a':
        cr = cr + 3
        return 'a'
    elif s[cr] == 'o':
        cr = cr + 2
        return 'o'
    else:
        return -1

itms_l = 1
itms.append([0, -1])

while itms_l != 0:
    itm = itms.pop()
    itms_l = itms_l - 1

    if itm[0] == 0:
        itms.append([1, -1])
        itms.append([3, -1])
        itms_l = itms_l + 2
        continue
    if itm[0] == 1:
        prev = cr
        if gnt() == 'o':
            itms.append([2, ret])
            itms.append([3, -1])
            itms_l = itms_l + 2
            continue
        cr = prev
        continue
    if itm[0] == 2:
        itms.append([1, -1])
        ret = (itm[1] + ret - itm[1] * ret) * (1 - r) + ((1 - itm[1]) * (1 - ret)) * r
        itms_l = itms_l + 1
        continue
    if itm[0] == 3:
        itms.append([4, -1])
        itms.append([6, -1])
        itms_l = itms_l + 2
        continue
    if itm[0] == 4:
        prev = cr
        if gnt() == 'a':
            itms.append([5, ret])
            itms.append([6, -1])
            itms_l = itms_l + 2
            continue
        cr = prev
        continue
    if itm[0] == 5:
        itms.append([4, -1])
        ret = itm[1] * ret * (1 - r) + (1 - itm[1] * ret) * r
        itms_l = itms_l + 1
        continue
    if itm[0] == 6:
        c = gnt()
        if c == 'Y':
            ret = 1
            continue
        elif c == 'N':
            ret = 0
            continue
        elif c == '(':
            itms.append([7, -1])
            itms.append([0, -1])
            itms_l = itms_l + 2
            continue
        elif c == 'r':
            gnt()
            itms.append([8, -1])
            itms.append([0, -1])
            itms_l = itms_l + 2
            continue
    if itm[0] == 7:
        gnt()
        continue
    if itm[0] == 8:
        itms.append([9, ret])
        itms.append([0, -1])
        itms_l = itms_l + 2
        continue
    if itm[0] == 9:
        gnt()
        ret = ret * itm[1] * p + (1 - ret * itm[1]) * q
        continue

print(int(ret * 100))