#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int pairs[300000] = {0};
  int Max = 0;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      pairs[a[i] + a[j]] += 1;
      Max = max(Max, pairs[a[i] + a[j]]);
    }
  cout << Max;
}
