#include <bits/stdc++.h>
using namespace std;
const int maxx = 2e5 + 7;
const int inf = 1 << 30;
const long long INF = 1ll << 60;
int n;
int a[1022];
int cnt[maxx];
int ans;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) cnt[a[i] + a[j]]++;
  }
  for (int i = 0; i <= 2e5; i++) ans = max(ans, cnt[i]);
  cout << ans << endl;
}
