#include <bits/stdc++.h>
using namespace std;
template <typename T>
T read() {
  T res;
  std::cin >> res;
  return res;
}
template <typename T>
void print(const T& t) {
  std::cout << t;
}
template <>
int read<int>() {
  int res;
  scanf("%d", &res);
  return res;
}
template <>
void print<int>(const int& t) {
  printf("%d", t);
};
template <>
unsigned int read<unsigned int>() {
  unsigned int res;
  scanf("%u", &res);
  return res;
}
template <>
void print<unsigned int>(const unsigned int& t) {
  printf("%u", t);
};
template <>
int64_t read<int64_t>() {
  int64_t res;
  scanf("%lld", &res);
  return res;
}
template <>
void print<int64_t>(const int64_t& t) {
  printf("%lld", t);
};
template <>
float read<float>() {
  float res;
  scanf("%f", &res);
  return res;
}
template <>
void print<float>(const float& t) {
  printf("%f", t);
};
template <>
double read<double>() {
  double res;
  scanf("%lf", &res);
  return res;
}
template <>
void print<double>(const double& t) {
  printf("%lf", t);
};
template <>
char read<char>() {
  char res;
  scanf("%c", &res);
  return res;
}
template <>
void print<char>(const char& t) {
  printf("%c", t);
};
namespace internal {
template <typename ValueT>
class IterableRange {
 public:
  class iterator {
   public:
    iterator(ValueT v__) : v_(v__) {}
    iterator& operator++() {
      ++v_;
      return *this;
    }
    bool operator==(iterator rhs) const { return v_ == rhs.v_; }
    bool operator!=(iterator rhs) const { return v_ != rhs.v_; }
    ValueT operator*() const { return v_; }
    ValueT operator->() const { return v_; }

   private:
    ValueT v_ = {};
  };
  IterableRange(ValueT begin__, ValueT end__)
      : begin_value_(std::min(begin__, end__)), end_value_(end__) {}
  iterator begin() const { return {begin_value_}; }
  iterator end() const { return {end_value_}; }

 private:
  ValueT begin_value_ = {};
  ValueT end_value_ = {};
};
}  // namespace internal
template <typename ValueT>
internal::IterableRange<ValueT> range(ValueT end) {
  return {{}, end};
}
template <typename ValueT>
internal::IterableRange<ValueT> range(ValueT begin, ValueT end) {
  return {begin, end};
}
template <typename T>
void relax_max(T& relaxWhat, const T& relaxBy) {
  relaxWhat = std::max(relaxWhat, relaxBy);
}
template <typename T>
void relax_min(T& relaxWhat, const T& relaxBy) {
  relaxWhat = std::min(relaxWhat, relaxBy);
}
using namespace std;
class Solver650B {
 public:
  void run();
  int a, b;
  int t, n;
  class SeenPhotos {
   public:
    int a_, b_;
    int t_ = 0;
    int cnt_ = 0;
    SeenPhotos(int a, int b) : a_(a), b_(b), t_(-a) {}
    void addForward(int inversed) {
      ++cnt_;
      t_ += a_ + 1 + inversed * b_;
    }
    void removeForward(int inversed) {
      --cnt_;
      t_ -= a_ + 1 + inversed * b_;
    }
    void addBackward(int inversed) {
      ++cnt_;
      t_ += 2 * a_ + 1 + inversed * b_;
    }
    void removeBackward(int inversed) {
      --cnt_;
      t_ -= 2 * a_ + 1 + inversed * b_;
    }
    int getTime() { return max(0, t_); }
    int getCount() { return cnt_; }
  };
  int answer(const vector<int>& inversions) const {
    int ans = 0;
    SeenPhotos sp(a, b), spNext(a, b);
    int tookForw = 0;
    for (int i = 0; i < n; ++i) {
      spNext.addForward(inversions[i]);
      if (spNext.getTime() > t) break;
      sp = spNext;
      tookForw = i + 1;
    }
    if (tookForw > 0) {
      spNext = sp;
      int tookBackw = 0;
      for (int i = 0; i < n - tookForw; ++i) {
        spNext.addBackward(inversions[n - 1 - i]);
        if (spNext.getTime() > t) break;
        sp = spNext;
        tookBackw = i + 1;
      }
      relax_max(ans, sp.getCount());
      for (; tookForw > 0; --tookForw) {
        sp.removeForward(inversions[tookForw - 1]);
        spNext = sp;
        for (++tookBackw; tookBackw + tookForw <= n; ++tookBackw) {
          spNext.addBackward(inversions[n - tookBackw]);
          if (spNext.getTime() > t) break;
          sp = spNext;
        }
        --tookBackw;
        relax_max(ans, sp.getCount());
      }
    }
    return ans;
  }
};
void Solver650B::run() {
  cin >> n >> a >> b >> t;
  string orientation;
  cin >> orientation;
  vector<int> inversions;
  for (auto& c : orientation) {
    auto inc = (c == 'w') ? 1 : 0;
    inversions.push_back(inc);
  }
  vector<int> inversions2(n);
  for (int i : range(n)) inversions2[i] = inversions[(n - i) % n];
  cout << max(answer(inversions), answer(inversions2));
}
int main() {
  Solver650B solver;
  solver.run();
}
