#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a[n];
  map<long long, long long> m;
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; j++) {
      m[a[i] + a[j]]++;
    }
  }
  long long ans = 0;
  for (auto itr = m.begin(); itr != m.end(); itr++) {
    ans = max(ans, itr->second);
  }
  cout << ans;
}
