#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstring>
#include <deque>
#include <forward_list>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef bitset<16> BS;
struct edge {
    int to, cost, id;
};
const double EPS = 1E-09;
const ll MOD = 1E+09 + 7; // =998244353;
const ll INF = 1E18;
const int MAX_N = 1E+05;

ll dx[4] = { -1, 1, 0, 0 }, dy[4] = { 0, 0, -1, 1 };

int N;

string s;

bool fox(string& t, char c);

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    cin >> N >> s;

    string t;
    int ans = N;
    for (int i = 0; i < N; i++) {
        if (fox(t, s[i]))
            ans -= 3;
    }

    /*
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < N; j++) {
            cout << "i = " << i << ", j = " << j << ", dp = " << dp[i][j] << "\n";
        }
    }
    */

    //cout << "s = " << s << "\n";

    cout << ans << "\n";

    return 0;
}

bool fox(string& t, char c)
{
    t += c;
    if (t.size() < 3)
        return false;
    int n = t.size();
    if (t[n - 3] == 'f' && t[n - 2] == 'o' && t[n - 1] == 'x') {
        t.erase(t.begin() + n - 3, t.end());
        return true;
    }
    return false;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i,n) for(ll i=0;i<ll(n);i++)
#define REPE(i,l,n) for(ll i=l;i<=ll(n);i++)
#define FORA(i,I) for(const auto& i:I)
#define ALL(v) v.begin(),v.end()
#define P(str) cout << str << endl
#define VLL vector<ll>
#define chmax(a, b) a = (((a)<(b)) ? (b) : (a))
#define chmin(a, b) a = (((a)>(b)) ? (b) : (a))
constexpr int64_t INF = 1e18;

void c(VLL& v){
    REP(i, v.size()){
        v[i] -= v[i] * 2;
    }
}

int main() { 
    ll a, b;
    cin >> a >> b;
    ll mi = min(a, b);
    ll ma = max(a, b);
    bool f = true;
    if(a < b) f = false;
    VLL vmi(mi), vma(ma);
    ll summa = 0;
    REP(i, ma){
        vma[i] = i + 1;
        summa += vma[i];
    }
    ll summi = 0;
    
    REP(i, mi){
        vmi[i] = i + 1;
        summi += vmi[i];
    }
    // cout << summa << " " << summi << endl;
    vmi[mi - 1] += (summa - summi);
    if(f) c(vmi);
    else c(vma);
    FORA(i, vmi) cout << i << " ";
    REP(i, vma.size()){
        cout << vma[i];
        if(i == vma.size() - 1) cout << endl;
        else cout << " ";
    }
}