#include <bits/stdc++.h>
using namespace std;
const long long P = 1000000007;
set<long long> buy;
set<long long> sell;
set<long long> unknown;
char buf[10];
int main() {
  buy.insert(LLONG_MIN);
  sell.insert(LLONG_MAX);
  long long n;
  scanf("%lld", &n);
  long long ans = 1;
  for (long long i = 0; i < n; i++) {
    long long p;
    scanf("%s%lld", buf, &p);
    long long bmax = *buy.rbegin();
    long long smin = *sell.begin();
    if (buf[1] == 'D') {
      if (p > bmax && p < smin) {
        unknown.insert(p);
      } else if (p < bmax) {
        buy.insert(p);
      } else if (p > smin) {
        sell.insert(p);
      }
    } else {
      if (p > bmax && p < smin) {
        for (auto x : unknown) {
          if (x < p) {
            buy.insert(x);
          }
          if (x > p) {
            sell.insert(x);
          }
        }
        unknown.clear();
        ans *= 2;
        ans %= P;
      } else if (p == bmax) {
        buy.erase(p);
        for (auto x : unknown) {
          sell.insert(x);
        }
        unknown.clear();
      } else if (p == smin) {
        sell.erase(p);
        for (auto x : unknown) {
          buy.insert(x);
        }
        unknown.clear();
      } else {
        ans = 0;
        break;
      }
    }
  }
  ans *= unknown.size() + 1;
  ans %= P;
  cout << ans << endl;
}
