#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ans = 1, k, mdl = 1e9 + 7;
  string syntax;
  cin >> n;
  set<int> buy, sell;
  queue<int> q;
  for (int i = 0; i < n; ++i) {
    cin >> syntax;
    scanf("%d", &k);
    if (syntax == "ADD") {
      if (!buy.empty() && k < *buy.rbegin())
        buy.insert(k);
      else if (!sell.empty() && k > *sell.begin())
        sell.insert(k);
      else
        q.push(k);
    } else if (syntax == "ACCEPT") {
      if (!buy.empty() && k < *buy.rbegin()) {
        cout << 0 << '\n';
        return 0;
      } else if (!sell.empty() && k > *sell.begin()) {
        cout << 0 << '\n';
        return 0;
      } else {
        while (!q.empty()) {
          if (q.front() < k)
            buy.insert(q.front());
          else if (q.front() > k)
            sell.insert(q.front());
          q.pop();
        }
        if (buy.find(k) == buy.end() && sell.find(k) == sell.end())
          ans = (ans * 2) % mdl;
        buy.erase(k);
        sell.erase(k);
      }
    }
  }
  cout << ((long long)ans * (q.size() + 1)) % mdl << '\n';
  return 0;
}
