#include <bits/stdc++.h>

using namespace std;

int main() {
	int n;
	cin >> n;
	vector<int> a;
	for(int i = 0; i < n; i++) {
		int x;
		cin >> x;
		a.push_back(x);
	}
	sort(a.begin(), a.end());
	bool sequence = false;
	for(int i = 0; i < n-1; i++) {
		if(a.at(i+1) - a.at(i) == 1) {
			sequence = true;
		} else {
			sequence = false;
			break;
		}
	}
	if(a.size() < 2) sequence = true;
	if(sequence) {
		cout << "Yes";
	} else {
		cout << "No";
	}
	return 0;
}
#include <bits/stdc++.h>
//#include "debugger.h"
#define int long long
#define pb push_back
#define pp pop_back
#define f first
#define s second
#define all(x) x.begin(),x.end()
using namespace std;

signed main() {
		
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	
	int n;
	cin >> n;
	
	int ans = 0;
	for (int i = 1; i <= n; i++) {
		string s;
		cin >> s;
		
		if (s == "OR") {
			ans += (1ll << i);
		}
	}
		
	cout << ans + 1 << endl;
	
	return 0;
}
