#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  long long int n;
  cin >> n;
  if (n == 1) {
    cout << 2;
    exit(0);
  }
  set<long long int> se;
  long long int minn, maxx;
  minn = -123;
  long long int res = 1;
  maxx = 999999999999;
  se.insert(minn);
  bool ok = false;
  long long int cnt = 1;
  se.insert(maxx);
  while (n--) {
    string s;
    cin >> s;
    long long int x;
    cin >> x;
    if (s == "ADD") {
      se.insert(x);
      if (x >= minn && x <= maxx) cnt++;
    } else {
      if (x < minn || x > maxx) {
        cout << 0;
        exit(0);
      }
      if (x != minn && x != maxx) {
        res *= 2;
        res %= 1000000000 + 7;
      }
      cnt = 1;
      se.erase(x);
      set<long long int>::iterator itr;
      itr = se.lower_bound(x);
      maxx = *itr;
      minn = *(--itr);
    }
  }
  cnt %= 1000000000 + 7;
  res *= cnt;
  res %= 1000000000 + 7;
  cout << res;
}
