#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];
  int h[200001] = {0};
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) h[arr[i] + arr[j]]++;
  }
  sort(h, h + 200001);
  cout << h[200000];
}
