N, K = map(int, input().split()) A = list(map(int, input().split())) cnt = 0 for k1 in range(N): if K >= 2: for k2 in range(k1 + 1, N): if K >= 3: for k3 in range(k2 + 1, N): if K >= 4: for k4 in range(k3 + 1, N): if K >= 5: for k5 in range(k4 + 1, N): if K >= 6: for k6 in range(k5 + 1, N): if K >= 7: for k7 in range(k6 + 1, N): if K >= 8: for k8 in range(k7 + 1, N): S = A[k1] + A[k2] + A[k3] + A[k4] + A[k5] + A[k6] + A[k7] + A[k8] if S % 998244352 <= S % 998: cnt = (cnt + 1) % 998 else: S = A[k1] + A[k2] + A[k3] + A[k4] + A[k5] + A[k6] + A[k7] if S % 998244352 <= S % 998: cnt = (cnt + 1) % 998 else: S = A[k1] + A[k2] + A[k3] + A[k4] + A[k5] + A[k6] if S % 998244352 <= S % 998: cnt = (cnt + 1) % 998 else: S = A[k1] + A[k2] + A[k3] + A[k4] + A[k5] if S % 998244352 <= S % 998: cnt = (cnt + 1) % 998 else: S = A[k1] + A[k2] + A[k3] + A[k4] if S % 998244352 <= S % 998: cnt = (cnt + 1) % 998 else: S = A[k1] + A[k2] + A[k3] if S % 998244352 <= S % 998: cnt = (cnt + 1) % 998 else: S = A[k1] + A[k2] if S % 998244352 <= S % 998: cnt = (cnt + 1) % 998 else: S = A[k1] if S % 998244352 <= S % 998: cnt = (cnt + 1) % 998 print(cnt)