#include <bits/stdc++.h>
using namespace std;
const long long N = 5000005;
const long long INF = 1000000000000000007;
const long long mod = 1000000007;
long long a[10005];
long long v[N];
void solve() {
  long long n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  long long maxx = (a[n - 2] + a[n - 1]);
  memset(v, 0, sizeof(v));
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      v[a[i] + a[j]]++;
    }
  long long ans = -1;
  for (int i = 0; i <= maxx; i++) ans = max(ans, v[i]);
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
