#include <bits/stdc++.h>
using namespace std;
struct edge {
  long long int A;
  long long int B;
};
long long int power(long long int a, long long int b, long long int mod) {
  long long int x = 1, y = a;
  while (b > 0) {
    if (b % 2) {
      x = (x * y) % mod;
    }
    y = (y * y) % mod;
    b /= 2;
  }
  return x % mod;
}
long long int modular_inverse(long long int n, long long int mod) {
  return power(n, mod - 2, mod);
}
bool edgecompare(edge lhs, edge rhs) {
  if (lhs.B != rhs.B)
    return lhs.B < rhs.B;
  else
    return lhs.A < rhs.A;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m, i, j, k, flag = 0, x;
  string str;
  long long int a;
  cin >> n;
  set<long long int> S;
  long long int ans = 1;
  long long int curr = 0;
  long long int buy = INT_MIN, sell = INT_MAX;
  S.insert(INT_MIN);
  S.insert(INT_MAX);
  for (i = 0; i < n; i++) {
    cin >> str >> a;
    if (str == "ADD") {
      S.insert(a);
      if (a > buy && a < sell) {
        curr++;
      }
    } else {
      if (a < buy || a > sell) {
        ans = 0;
        break;
      } else {
        set<long long int>::iterator it2 = S.find(a);
        set<long long int>::iterator it1 = S.find(a);
        it1--;
        it2++;
        if (a != buy && a != sell) {
          buy = *it1;
          sell = *it2;
          ans *= 2;
          ans %= 1000000007;
          curr = 0;
        } else {
          buy = *it1;
          sell = *it2;
          curr = 0;
        }
        S.erase(a);
      }
    }
  }
  ans *= (curr + 1);
  ans %= 1000000007;
  cout << ans;
  return 0;
}
