#include <bits/stdc++.h>
using namespace std;
int arr[20000], brr[200], mp[200000] = {0};
map<int, int> s;
int main() {
  int i, j, k, l, a, b, n, t, sum = 0, maxA = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> arr[i];
  }
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      mp[arr[i] + arr[j]]++;
      if (maxA < mp[arr[i] + arr[j]]) {
        maxA = mp[arr[i] + arr[j]];
      }
    }
  }
  cout << maxA << endl;
  return 0;
}
