#include <bits/stdc++.h>
using namespace std;
int p[5010];
int ile[5010 * 5010];
pair<int, int> a[5010];
bool czy[5010];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> p[i];
  }
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) ile[p[i] + p[j]]++;
  }
  int maxi = 0;
  for (int i = 0; i < 200010; ++i) {
    maxi = max(maxi, ile[i]);
  }
  cout << maxi;
}
