//https://atcoder.jp/contests/abc189/tasks/abc189_d
//题意：给定一串OR和AND组成的n长字符串，代表V,^求有多少种n+1长的由0,1组成的字串使两两运算最终结果为1
//思路：找规律，默认有一种，有OR才增加，还与OR有关。
#include <stdio.h>

int main(int argc, char **argv)
{
  int N, i;
  unsigned long long T = 1;
  scanf("%d", &N);
  for(i = 1; i <= N; ++i){
    char buff[10];
    scanf("%s", buff);
    if(buff[0] == 'O'){
      T = T + (1ull<<i);
    }
  }
  printf("%llu", T);
  return 0;
}

#include <bits/stdc++.h>

using namespace std;

#define int long long
#define double long double
#define ull unsigned long long
#define pii pair<int,int>
#define tiii tuple<int,int,int>
#define pll pair<long long, long long>
#define pdd pair<double, double>
#define s second
#define f first
#define pb push_back
#define oo 1000000000000000000ll

void solve() {

	int n; cin >> n;
	vector<int> cnt(n+1);
	for (int i = 0; i < n; ++i){
		int x; cin >> x;
		cnt[x]++;
	}
	
	bool ans = true;
	for (int i = 1; i <= n; ++i){
		ans &= cnt[i] == 1;
	}
	
	if (ans) cout << "Yes\n";
	else cout << "No\n";

}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int tst; tst = 1;
    //cin >> tst;
    while (tst--){
        solve();
    }

    return 0;

}