#include <bits/stdc++.h>
using namespace std;
set<long long> S;
string s;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, i, l = -1, r = 1e18, MOD = 1e9 + 7, ans = 1, cnt = 0, num;
  cin >> n;
  S.insert(l);
  S.insert(r);
  for (i = 0; i < n; i++) {
    cin >> s >> num;
    if (s[1] == 'D')
      S.insert(num);
    else {
      if (num < l || num > r) {
        ans = 0;
      } else if (num > l && num < r)
        ans = (ans * 2) % MOD;
      auto it = S.find(num);
      it--;
      l = *it;
      it++;
      it++;
      r = *it;
      S.erase(S.find(num));
    }
  }
  for (auto elem : S) {
    if (elem > l && elem < r) cnt++;
  }
  ans = (ans * (cnt + 1)) % MOD;
  cout << ans << endl;
  return 0;
}
