n, k = map(int, input().split()) A = list(map(int, input().split())) mod = 998244353 from collections import defaultdict dp = [defaultdict(lambda: 0) for i in range(k+1)] dp[0][0] = 1 for i, a in enumerate(A): for j in range(i+1): for s, v in dp[j].items(): if j+1 <= k and s^a == s+a: dp[j+1][s^a] +=v dp[j+1][s^a] %= mod ans = 0 for s, v in dp[k].items(): ans += v ans %= mod print(ans)