#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  cin >> n;
  long int a[n];
  vector<long int> v;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      v.push_back(a[i] + a[j]);
    }
  }
  sort(v.begin(), v.end());
  long int k = v[0], ma = 0, count = 0;
  i = 0;
  while (i < v.size()) {
    count = 0;
    while (v[i] == k && i < v.size()) {
      count++;
      i++;
    }
    if (count > ma) {
      ma = count;
    }
    k = v[i];
  }
  cout << ma;
}
