#include <bits/stdc++.h>
using namespace std;
const long long N = 4e5;
const long long MOD = 1e9 + 7;
long long n, ans = 1, check = 1, maxB = 0, leastS;
multiset<long long> s;
void init() {
  maxB = 0;
  leastS = 308983067;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  init();
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    string op;
    cin >> op;
    if (op == "ADD") {
      long long cur;
      cin >> cur;
      s.insert(cur);
      if (i == n) {
        long long curans = 1;
        auto it = s.lower_bound(maxB + 1);
        while (it != s.end() && *it < leastS) {
          curans++;
          it++;
        }
        ans *= curans;
        ans %= MOD;
      }
    } else {
      long long cur;
      cin >> cur;
      if (cur < maxB) {
        cout << "0";
        return 0;
      }
      if (cur > leastS) {
        cout << "0";
        return 0;
      }
      if (cur != leastS && cur != maxB) ans *= 2;
      ans %= MOD;
      s.erase(cur);
      auto it = s.lower_bound(cur);
      if (it != s.end())
        leastS = *it;
      else
        leastS = 308983067;
      if (it != s.begin())
        maxB = *(--it);
      else
        maxB = 0;
    }
  }
  cout << ans;
  return 0;
}
