#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  char last, f;
  cin >> last;
  int ans = 0;
  f = last;
  for (int i = 1; i < n; i++) {
    char a;
    cin >> a;
    if (a != last) ans++;
    last = a;
  }
  if (f == 'F')
    cout << "NO\n";
  else
    cout << ((ans & 1) ? "YES\n" : "NO\n");
}
