#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  cin >> n >> a;
  vector<int> x(n);
  for (int i = 0; i < n; i++) {
    cin >> x[i];
  }
  long long ans = 0;
  for (int bit = 0; bit < 1 << n; bit++) {
    if (bit == 0) continue;
    long long sum = 0;
    long long count = 0;
    for (int i = 0; i < n; i++) {
      if (bit & (1 << i)) {
        sum += x[i];
        count++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
