#include using namespace std; #define rep(i,n) for (int i = 0; i < (n); i++) template inline bool chmax(T &a, T b) {return ((a < b) ? (a = b, true) : (false));} template inline bool chmin(T &a, T b) {return ((a > b) ? (a = b, true) : (false));} typedef long long ll; typedef pair P; int main() { ll n, k; cin >> n >> k; vector a(n); rep(i,n) cin >> a[i]; ll ans = 0; rep(i,1<>j&1) { sum += a[j]; cnt++; } } if(cnt == k && sum % 998244353 <= sum % 998) { ans++; } } cout << ans % 998 << endl; return 0; }