#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll N;
  cin >> N;
  vector<ll> a(N);
  vector<vector<ll>> num(N, vector<ll>(60));
  for (ll i = 0; i < N; i++) {
    cin >> a[i];
  }
  for (ll i = 0; i < 60; i++) {
    num[N - 1][i] = (a[N - 1] >> i & 1);
  }
  for (ll i = N - 2; i >= 0; i--) {
    for (ll j = 0; j < 60; j++) {
      num[i][j] = num[i + 1][j] + (a[i + 1] >> i & 1);
    }
  }
  return 0;
}
