#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  map<int, int> x;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      x[arr[i] + arr[j]]++;
    }
  }
  set<int, greater<int>> p;
  for (auto it = x.begin(); it != x.end(); it++) p.insert(it->second);
  cout << *p.begin() / 2;
  return 0;
}
