import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

/*
 public class _651D {

 }

 */
public class _651D {
  public void solve() throws FileNotFoundException {
    InputStream inputStream = System.in;

    InputHelper in = new InputHelper(inputStream);

    // actual solution
    int n = in.readInteger();
    int a = in.readInteger();
    int b = in.readInteger();

    int t = in.readInteger();

    String p = in.read();

    int[] front = new int[n];

    int cur = 0;
    int ans = 0;
    for (int i = 0; i < n; i++) {
      if (p.charAt(i) == 'w') {
        front[i] = cur + 1 + b;
      } else {
        front[i] = cur + 1;
      }
      cur = front[i];
      if (cur <= t) {
        ans = Math.max(ans, i + 1);
      }
      cur = front[i] + a;
    }

    if (front[n - 1] <= t) {
      System.out.println(n);
      return;
    }

    int[] back = new int[n];

    cur = a;
    for (int i = n - 1; i >= 0; i--) {
      if (p.charAt(i) == 'w') {
        back[i] = cur + 1 + b;
      } else {
        back[i] = cur + 1;
      }
      cur = back[i];
      int rem = t - cur - (n - i) * a;

      if (rem > 0) {
        int lo = 0;
        int hi = n - 1;

        while (lo <= hi) {
          int mid = (lo + hi) / 2;

          if (front[mid] <= rem) {
            ans = Math.max(ans, (n - i) + mid + 1);
            lo = mid + 1;
          } else {
            hi = mid - 1;
          }
        }
      }

      cur = back[i] + a;
    }

    cur = 0;
    for (int i = 0; i < n; i++) {
      cur = front[i];

      int rem = t - cur - i * a;

      if (rem > 0) {
        int lo = 0;
        int hi = n - 1;

        while (lo <= hi) {
          int mid = (lo + hi) / 2;

          if (back[mid] <= rem) {
            ans = Math.max(ans, i + 1 + (n - mid));
            hi = mid - 1;
          } else {
            lo = mid + 1;
          }
        }
      }
    }

    System.out.println(Math.min(ans, n));
    // end here
  }

  public static void main(String[] args) throws FileNotFoundException {
    (new _651D()).solve();
  }

  class InputHelper {
    StringTokenizer tokenizer = null;
    private BufferedReader bufferedReader;

    public InputHelper(InputStream inputStream) {
      InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
      bufferedReader = new BufferedReader(inputStreamReader, 16384);
    }

    public String read() {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
        try {
          String line = bufferedReader.readLine();
          if (line == null) {
            return null;
          }
          tokenizer = new StringTokenizer(line);
        } catch (IOException e) {
          e.printStackTrace();
        }
      }

      return tokenizer.nextToken();
    }

    public Integer readInteger() {
      return Integer.parseInt(read());
    }

    public Long readLong() {
      return Long.parseLong(read());
    }
  }
}
