#include <bits/stdc++.h>
int main() {
  long long N, a, sum = 0, partialSum = 0;
  std::vector<long long> v;
  std::cin >> N;
  for (int i = 0; i < N; i++) {
    std::cin >> a;
    v.emplace_back(a);
  }
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      partialSum = ((v[i] ^ v[j]) % (1000000007));
    }
  }
  std::cout << sum << '\n';
  return 0;
}
