#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 10;
const int maxn = 2e5 + 10;
int a[N], n, vis[maxn];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + n);
  int ans = 0;
  for (int i = 1; i <= n; i++)
    for (int j = i; j <= n; j++) {
      if (i == j) continue;
      int id = a[i] + a[j];
      vis[id]++;
      ans = max(ans, vis[id]);
    }
  cout << ans << endl;
}
