#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 1e11;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  long long ans = 1;
  long long pending_size = 1;
  long long max_buy = -INF, min_sale = INF;
  set<long long> mset;
  for (int i = 0; i < n; ++i) {
    static string op;
    static long long p;
    cin >> op >> p;
    if (op == "ACCEPT") {
      if (p < max_buy || p > min_sale) {
        cout << 0 << endl;
        return 0;
      }
      auto it = mset.find(p);
      if (p == max_buy)
        max_buy = -INF;
      else if (p == min_sale)
        min_sale = INF;
      else {
        ans = (ans * 2) % MOD;
      }
      auto pit = it;
      --pit;
      max_buy = max(max_buy, (it != mset.begin()) ? *pit : -INF);
      pit = it;
      ++pit;
      min_sale = min(min_sale, (pit != mset.end()) ? *pit : INF);
      mset.erase(it);
      pending_size = 1;
    } else {
      mset.insert(p);
      if (p > max_buy && p < min_sale) ++pending_size;
    }
  }
  ans = (ans * pending_size) % MOD;
  cout << ans << endl;
  return 0;
}
