#include <bits/stdc++.h>
char in[500010];
int vl[500010];
int vr[500010];
int main() {
  int n, a, b, T;
  int vrl, vll;
  scanf("%d%d%d%d", &n, &a, &b, &T);
  getchar();
  scanf("%s", in);
  if (in[0] == 'w') {
    T -= b;
  }
  T--;
  if (T < 0) {
    printf("0\n");
    return 0;
  } else {
    int tt = T;
    vr[0] = 0;
    vrl = -1;
    for (int i = 2; i < n; i++) {
      int x = (in[i - 1] == 'w') * b;
      x += (a + 1);
      vr[i - 1] = vr[i - 2] + x;
      tt -= x;
      if (tt < 0) {
        vrl = i - 1;
        break;
      }
    }
    if (vrl == -1) {
      printf("%d\n", n);
      return 0;
    }
    tt = T;
    vl[0] = 0;
    vll = -1;
    for (int i = n - 1; i > 0; i--) {
      int x = (in[i] == 'w') * b;
      x += (a + 1);
      vl[n - i] = vr[n - i - 1] + x;
      tt -= x;
      if (tt < 0) {
        vll = n - i;
        break;
      }
    }
    if (vll == -1) {
      printf("%d\n", n);
      return 0;
    }
    int ans = 1;
    for (int i = 1; i <= vrl; i++) {
      int tans = i + 1;
      int lt = T - vr[i];
      if (lt < 0) {
        break;
      } else if (lt == 0) {
        ans = ans > tans ? ans : tans;
        break;
      } else {
        lt -= (a * i);
        if (lt <= 0) {
          continue;
        }
        int l = 1, r = vll;
        if (vl[l] > lt) {
          ans = ans > tans ? ans : tans;
          continue;
        }
        while (r - l > 1) {
          int mid = (l + r) >> 1;
          if (vl[mid] <= lt) {
            l = mid;
          } else
            r = mid;
        }
        tans += l;
        ans = ans > tans ? ans : tans;
      }
    }
    for (int i = 1; i <= vll; i++) {
      int tans = i + 1;
      int lt = T - vl[i];
      if (lt < 0) {
        break;
      } else if (lt == 0) {
        ans = ans > tans ? ans : tans;
        break;
      } else {
        lt -= (a * i);
        if (lt <= 0) {
          continue;
        }
        int l = 1, r = vrl;
        if (vr[l] > lt) {
          ans = ans > tans ? ans : tans;
          continue;
        }
        while (r - l > 1) {
          int mid = (l + r) >> 1;
          if (vr[mid] <= lt) {
            l = mid;
          } else
            r = mid;
        }
        tans += l;
        ans = ans > tans ? ans : tans;
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
