#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long Array[n], Array2[200005];
  long long x, y, counter, max = 0, counter2;
  for (counter = 1; counter < 200001; ++counter) {
    Array2[counter] = 0;
  }
  for (counter = 0; counter < n; counter++) {
    cin >> Array[counter];
  }
  for (x = 0; x < n; ++x) {
    for (y = x + 1; y < n; ++y) {
      Array2[Array[x] + Array[y]] = Array2[Array[x] + Array[y]] + 1;
    }
  }
  for (counter = 2; counter < 200001; ++counter) {
    if (Array2[counter] > max) {
      max = Array2[counter];
    }
  }
  cout << max << endl;
  return 0;
}
