#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a[n + 1];
  if (n == 2) {
    cout << "1" << endl;
    return 0;
  }
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<long long> v;
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < n; j++) {
      if (i != j) {
        long long p = a[i] + a[j];
        v.push_back(p);
      }
    }
  }
  long long x = v.size();
  sort(v.begin(), v.end());
  long long c = 1, mx = INT_MIN;
  for (long long i = 1; i < x; i++) {
    if (v[i] == v[i - 1]) {
      c++;
    } else {
      mx = max(mx, c);
      c = 1;
    }
  }
  cout << mx / 2 << endl;
}
