/*
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <map>
*/

#include <bits/stdc++.h>
#define rep(i,cc,n) for(int i=cc;i<=n;++i)
#define drep(i,cc,n) for(int i=cc;i>=n;--i)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const long long INF = 1LL <<60;
typedef long long ll;
using namespace std;
 
ll gcd(ll a, ll b) {
    if (b==0) return a;
    else return gcd(b, a%b);
}
 
ll lcm(ll a, ll b) {
    return a * b / gcd(a, b);
}
 
ll choose2(ll n){
    return n*(n-1)/2;
}
 
int main(){
    ll n,x;
    cin >> n >> x;
    string s;
    cin >> s;

    rep(i,0,n-1){
        if(s[i] == 'x'){
            if(x > 0){
                x--;
            }
        }
        else x++;
    }

    cout << x << endl;

    return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template<ll mod>
struct Mint {
    ll x;
    Mint(ll x = 0) : x((x %= mod) < 0 ? x + mod : x) { }
    Mint& operator+=(Mint rhs) { return (x += rhs.x) >= mod ? x -= mod : 0, *this; }
    Mint& operator-=(Mint rhs) { return (x -= rhs.x) < 0 ? x += mod : 0, *this; }
    Mint& operator*=(Mint rhs) { return (x *= rhs.x) %= mod, *this; }
    Mint& operator/=(Mint rhs) { return *this *= rhs.power(-1); }
    Mint power(ll p) const {
        p %= mod - 1;
        if (p < 0) p += mod - 1;
        Mint res = 1;
        for (Mint y = *this; p; p >>= 1, y *= y) if (p & 1) res *= y;
        return res;
    }
    bool operator==(Mint rhs) const { return x == rhs.x; }
    bool operator<(Mint rhs) const { return x < rhs.x; }
    friend Mint operator+(Mint lhs, Mint rhs) { return lhs += rhs; }
    friend Mint operator-(Mint lhs, Mint rhs) { return lhs -= rhs; }
    friend Mint operator*(Mint lhs, Mint rhs) { return lhs *= rhs; }
    friend Mint operator/(Mint lhs, Mint rhs) { return lhs /= rhs; }
    friend ostream& operator<<(ostream& out, Mint a) { return out << a.x; }
    friend istream& operator>>(istream& in, Mint& a) {
        ll x;
        in >> x;
        a = Mint(x);
        return in;
    }
};
constexpr ll mod = 998244353;
using mint = Mint<mod>;
int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int N;
    cin >> N;
    const int Wmax = 100;
    vector<vector<mint>> dp(N + 1, vector<mint>(N * Wmax + 1));
    dp[0][0] = 1;
    int sum = 0;
    for (int i = 0; i < N; ++i) {
        int W;
        cin >> W;
        for (int k = N - 1; k >= 0; --k) {
            for (int x = N * Wmax - W; x >= 0; --x) {
                dp[k + 1][x + W] += dp[k][x];
            }
        }
        sum += W;
    }
    mint ans = 0;
    if (sum % 2 == 0) {
        vector<mint> f(N + 1, 1);
        for (int x = 1; x <= N; ++x) {
            f[x] = x * f[x - 1];
        }
        for (int k = 1; k <= N; ++k) {
            ans += dp[k][sum / 2] * f[k] * f[N - k];
        }
    }
    cout << ans << endl;
    exit(0);
}
