#include <iostream>

using namespace std;

int n, a, b, count;
long T, time;
string orientation;

int main()
{
    time = 0;
    count = 0;
    cin >> n >> a >> b >> T;
    orientation = new char[n];
    cin >> orientation;
    while(count < n)
    {
        time += ((count == 0 ? 0 : a + 1) + (orientation[count] == 'w' && count != 0? b : 0));
        if(time > T) break;
        count++;
    }

    cout << count;
}
