#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, n, a[1000], j, mx = 0;
  map<long long, long long> mp;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      mp[a[i] + a[j]]++;
      if (mp[a[i] + a[j]] > mx) mx = mp[a[i] + a[j]];
    }
  }
  cout << mx;
}
