#include <bits/stdc++.h>
using namespace std;
const int64_t MOD = 1e9 + 7LL;
vector<int> vals;
set<int> buy, sell;
int best_buy() {
  if (buy.rbegin() == buy.rend()) return -1;
  return *buy.rbegin();
}
int best_sell() {
  if (sell.begin() == sell.end()) return 987654321;
  return *sell.begin();
}
int handle(int v) {
  if (v < best_buy() || v > best_sell()) return 0;
  for (int i = 0; i < vals.size(); ++i) {
    if (vals[i] > v) {
      sell.insert(vals[i]);
    } else if (vals[i] < v) {
      buy.insert(vals[i]);
    }
  }
  vals.clear();
  if (v == best_buy()) {
    buy.erase(v);
    return 1;
  } else if (v == best_sell()) {
    sell.erase(v);
    return 1;
  }
  return 2;
}
int main() {
  int N;
  scanf("%d", &N);
  int64_t ans = 1;
  while (N--) {
    string cmd;
    int val;
    cin >> cmd >> val;
    if (cmd == "ADD") {
      vals.push_back(val);
    } else {
      ans *= handle(val);
      ans %= MOD;
      if (ans == 0) {
        printf("0\n");
        return 0;
      }
    }
  }
  int m = 0;
  int b = best_buy();
  int h = best_sell();
  for (int i = 0; i < vals.size(); ++i)
    if (b < vals[i] && vals[i] < h) ++m;
  ans *= m + 1;
  ans %= MOD;
  cout << ans << endl;
  return 0;
}
