#include <bits/stdc++.h>
using namespace std;
int n;
int a[1010], has[200010];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a + 1, a + 1 + n);
  int res = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      has[a[i] + a[j]]++;
      res = max(res, has[a[i] + a[j]]);
    }
  }
  cout << res << endl;
  return 0;
}
