#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, -1, 1, -1, 1};
int dy[] = {-1, 1, 0, 0, 1, 1, -1, -1};
int dz[] = {0, 0, 1, -1, -1, 1, -1, 1};
int kx[] = {2, 2, -2, -2, 1, -1, 1, -1};
int ky[] = {1, -1, 1, -1, 2, 2, -2, -2};
double _distance(double x1, double y1, double x2, double y2) {
  double x1x2 = x1 - x2;
  double y1y2 = y1 - y2;
  return sqrt((x1x2 * x1x2) + (y1y2 * y1y2));
}
int f[200005];
int main() {
  int n, ans = 0;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) ans = max(ans, ++f[a[i] + a[j]]);
  cout << ans << endl;
  return 0;
}
