#include <bits/stdc++.h>
using namespace std;
void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
long long fre[1000000];
int32_t main() {
  fastio();
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; j++) {
      fre[a[i] + a[j]]++;
    }
  }
  long long ans = 0;
  for (long long i = 0; i < 1000000; i++) {
    ans = max(ans, fre[i]);
  }
  cout << ans;
}
