#include <bits/stdc++.h>
using namespace std;
template <typename T>
void printvec(vector<T>& vec) {
  for (long long int i = 0; i < vec.size(); i++) {
    cout << vec[i] << " ";
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  long long int n;
  cin >> n;
  long long int times = 1;
  vector<vector<long long int> > inp;
  for (long long int i = 0; i < n; i++) {
    string s;
    long long int x;
    cin >> s >> x;
    if (s.compare("ADD") == 0) {
      vector<long long int> sp;
      sp.push_back(0);
      sp.push_back(x);
      inp.push_back(sp);
    } else {
      vector<long long int> sp;
      sp.push_back(1);
      sp.push_back(x);
      inp.push_back(sp);
    }
  }
  long long int left = LONG_MIN;
  long long int right = LONG_MAX;
  set<long long int> myset;
  myset.insert(LONG_MIN);
  myset.insert(LONG_MAX);
  for (long long int i = 0; i < n; i++) {
    if (inp[i][0] == 0) {
      myset.insert(inp[i][1]);
    } else {
      long long int k = inp[i][1];
      if (k > left && k < right) {
        times = (times * 2) % 1000000007;
      } else if (k < left || k > right) {
        times = 0;
      }
      set<long long int>::iterator it;
      it = myset.find(k);
      it--;
      left = (*it);
      it++;
      it++;
      right = (*it);
      it--;
      myset.erase(it);
    }
  }
  long long int si = 0;
  set<long long int>::iterator it;
  it = myset.begin();
  while (it != myset.end()) {
    if ((*it) == LONG_MIN || (*it) == LONG_MAX) {
      it++;
      continue;
    }
    if ((*it) > left && (*it) < right) {
      si++;
    }
    it++;
  }
  times = (times * (si + 1)) % 1000000007;
  cout << times << "\n";
}
