#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
using std::pair;
using std::queue;
using std::set;
using std::sort;
using std::string;
using std::vector;
const int MOD = 1000000007;
const int MAXINT = 1000000000;
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  set<int> a;
  string action;
  int value;
  int cnt = 0;
  int lower = -1;
  int upper = MAXINT;
  int ans = 1;
  for (int i = 0; i < n; ++i) {
    cin >> action >> value;
    if (action == "ADD") {
      a.insert(value);
      if (lower < value && value < upper) {
        ++cnt;
      }
    } else {
      cnt = 0;
      if (value < lower || value > upper) {
        ans = 0;
      } else if (value > lower && value < upper) {
        ans = ans * 2 % MOD;
      }
      auto upperit = a.upper_bound(value);
      auto lowerit = a.find(value);
      upper = upperit != a.end() ? *upperit : MAXINT;
      lower = lowerit != a.begin() ? *(--lowerit) : -1;
      a.erase(value);
    }
  }
  if (cnt > 0) {
    ans = (long long)ans * (cnt + 1) % MOD;
  }
  cout << ans << endl;
  return 0;
}
