#include <bits/stdc++.h>
#define gc() getchar()
using namespace std;
typedef long long ll;

template <typename T> void rd(T &x){
	ll f=1;x=0;char c=gc();
	for(;!isdigit(c);c=gc())if(c=='-')f=-1;
	for(;isdigit(c);c=gc())x=(x<<1)+(x<<3)+(c^48);
	x*=f;
}

int a,b;

int main(){
	rd(a),rd(b);
	printf("%d\n",(1+a)*a/2*b*100+(1+b)*b/2*a);
	return 0;
}

#include<bits/stdc++.h>
#define rep(i, s, n) for (long long i = s; i < (int)(n); i++)
#define all(a) a.begin(), a.end()
#define put(i) cout<<fixed<<i<<endl
#define putl(a) for(auto x:a)cout<<x<<' '; cout<<endl
using namespace std;
using ll = long long;

int main(){
    ll n; cin >> n;
    deque<char> q;

    rep(i,0,n){
        char tmp; cin >> tmp;
        q.push_back(tmp);
        ll size = q.size();
        if(size > 2 and q[size-1] == 'x' and q[size-2] == 'o' and q[size-3] == 'f'){
            q.pop_back();
            q.pop_back();
            q.pop_back();
        }
    }

    put(q.size());
}