#include <bits/stdc++.h>
using namespace std;
int main() {
  ifstream myFile("task.in");
  if (!myFile.fail()) {
    assert(freopen("task.in", "r", stdin));
  }
  long long int n;
  cin >> n;
  long long int arr[n];
  for (long long int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  std::map<long long int, long long int> make_pair;
  for (long long int i = 0; i < n; i++) {
    for (long long int j = i + 1; j < n; j++) {
      make_pair[arr[i] + arr[j]]++;
    }
  }
  long long int count = 0;
  for (auto itr = make_pair.begin(); itr != make_pair.end(); ++itr) {
    if (itr->second > count) {
      count = itr->second;
    }
  }
  cout << count << endl;
  return 0;
}
