#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
#define rep(i,n) for(ll i=0; i<n; i++)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rrep(i,n) for(ll i=n-1; i>=0; i--)
#define fi first
#define se second
long long mo = 1000000007;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
typedef pair<ll,Pll> PlP;
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
template<class A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}cout << "\n";}
string zero_padding(int val, int nf){ ostringstream sout;sout << setfill('0') << setw(nf) << val; return sout.str();};
ld PI=3.14159265358979323846;
//using namespace atcoder;
vector<ll> pickdiv(ll n){
    vector<ll> res;
    for(ll i=1; i*i <=n;i++){
        if(n%i)continue;
        res.emplace_back(i);
        ll q = n/i;
        if(q != i){
            res.emplace_back(q);
        }
    }
    return res;
}


int main(){
    ll S,P;
    cin >> S >> P;
    auto v = pickdiv(P);
    bool f = 0;
    for(auto& e:v){
        ll q = P/e;
        if(q+e == S){
            f = 1;
        }
    }
    cout << (f?"Yes":"No") << endl;
}
#include <bits/stdc++.h>
using namespace std;

#define eb emplace_back
#define pb push_back
#define INF LLONG_MAX
#define FLT_INF pow(10.0, 16)

using ll = long long;
using vll = vector<ll>;
using ull = unsigned long long;
using int2 = pair<ll, ll>;
using int3 = tuple<ll, ll, ll>;

template <typename A>
string to_string(const A &v);
string to_string(const string &s) { return '"' + s + '"'; }
string to_string(const char *s) { return to_string((string)s); }
string to_string(char c) { return string(1, c); }
string to_string(bool b) { return (b ? "true" : "false"); }

template <typename A, typename B>
string to_string(const pair<A, B> &p)
{
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A, typename B, typename C>
string to_string(const tuple<A, B, C> &p)
{
  return "(" + to_string(std::get<0>(p)) + ", " + to_string(std::get<1>(p)) + ", " + to_string(std::get<2>(p)) + ")";
}

template <typename A>
string to_string(const A &v)
{
  bool first = true;
  string res = "{";
  for (const auto &x : v)
  {
    if (!first)
    {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}

template <typename T>
void sort(vector<T> &val)
{
  sort(val.begin(), val.end());
}

template <typename T>
void reverse(vector<T> &val)
{
  reverse(val.begin(), val.end());
}

template <typename T>
void sort_b(vector<T> &val)
{
  sort(val.begin(), val.end(), greater<T>());
}

template <typename T>
T pair_sum(pair<T, T> &val)
{
  return val.first + val.second;
}

template <typename T>
T min(T a, T b, T c)
{
  return min(min(a, b), c);
}

template <typename T>
T max(T a, T b, T c)
{
  return max(max(a, b), c);
}

template <typename T>
T mul_mod(T a, T b, T mod)
{
  T res = 0;
  a %= mod;
  while (b)
  {
    if (b & 1)
    {
      res = (res + a) % mod;
    }
    a = (2 * a) % mod;
    b >>= 1;
  }
  return res;
}

template <typename T>
T fac_mod(T v, T mod)
{
  ll res = 1;
  for (ll i = 1; i <= v; i++)
  {
    res *= i;
    res = res % mod;
  }
  return res;
}

template <typename T>
T pow_mod(T v, T p, T mod)
{
  if (p == 1)
    return v;

  if (p % 2 == 0)
  {
    T t = pow_mod(v, p / 2, mod);
    return (t * t) % mod;
  }
  else
  {
    return (v * pow_mod(v, p - 1, mod)) % mod;
  }
}
void debug_out() { cerr << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T)
{
  cerr << " " << to_string(H);
  debug_out(T...);
}

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) ;
#endif

#define COMMON_MOD static_cast<ll>(pow(10, 9) + 7)
#define PI 3.14159265

// sort(a.begin(), a.end(), less<ll>()); greater<ll>()
// cout<<fixed<<setprecision(20)<<(s/kl)*2;
/* printf("%lld %lld \n", cur_n, m / 2 + 1);
sort(a.begin(), a.end(), [ ](ll& lhs, ll& rhs) {return abs(lhs) < abs(rhs);});
*/

class mytask
{
public:
  mytask() {}

  int solve()
  {
    ll n;
    cin >> n;
    string s;
    cin >> s;
    n = s.size();
    vll stack;
    ll res = n;
    for (ll i = 0; i < n; i++)
    {
      if (s[i] == 'f')
        stack.pb(1);
      else if (s[i] == 'o' && stack.size() && stack.back() == 1)
      {
        stack[stack.size() - 1] = 2;
      }
      else if (s[i] == 'x' && stack.size() && stack.back() == 2)
      {
        stack.pop_back();
        res -= 3;
      }
      else
      {
        stack.clear();
      }
    }

    cout << res;

    return 0;
  }
};

int main()
{

  auto task = mytask();
  task.solve();

  return 0;
}
