#include <bits/stdc++.h>
using namespace std;
int n, best_buy = -1, best_sell = 1e9;
long long ans = 1, mod = 1e9 + 7;
set<int> s;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  cin >> n;
  for (int z = 0; z < n; ++z) {
    string type;
    int x;
    cin >> type >> x;
    if (type == "ADD") {
      s.insert(x);
    } else {
      s.erase(x);
      if (x < best_buy || x > best_sell) return cout << 0, 0;
      if (x == best_buy || x == best_sell) {
        ;
      } else {
        ans *= 2;
        ans %= mod;
      }
      auto it = s.upper_bound(x);
      if (it != s.end()) {
        best_sell = *it;
      } else {
        best_sell = 1e9;
      }
      if (it != s.begin()) {
        it--;
        best_buy = *it;
      } else {
        best_buy = -1;
      }
      if (best_buy >= best_sell) return cout << 0, 0;
    }
  }
  int cnt = 0;
  for (int x : s) {
    if (x > best_buy && x < best_sell) cnt++;
  }
  ans *= cnt + 1;
  ans %= mod;
  cout << ans << endl;
}
