#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, ct = 0;
  cin >> n;
  vector<long long int> v(n);
  map<long long int, long long int> mymap;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    for (int j = i - 1; j >= 0; j--) {
      mymap[v[i] + v[j]]++;
    }
  }
  for (std::map<long long int, long long int>::iterator it = mymap.begin();
       it != mymap.end(); ++it) {
    ct = max(ct, it->second);
  }
  cout << ct;
}
