#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, k, n, cnt = 0;
  cin >> n;
  unsigned long long int a[n];
  unsigned long long int b[200000] = {0};
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (i = n - 1; i != -1; i--) {
    for (j = 0; j < i; j++) {
      k = a[i] + a[j];
      b[k]++;
    }
  }
  sort(b, b + 200000, greater<int>());
  cout << b[0];
}
