#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, a[10000], b[200008];
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  fill(b, b + 200008, 0);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i != j) b[a[i] + a[j]]++;
    }
  }
  int w = 0;
  for (int i = 0; i < 200008; i++) {
    w = max(w, b[i]);
  }
  cout << w / 2 << endl;
}
