#include <bits/stdc++.h>
using namespace std;
int ar[1001], mark[1000006];
std::vector<int> v;
int main() {
  int n, ct = 1, f = 0, mx = 0;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> ar[i];
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int sum = ar[i] + ar[j];
      mark[sum]++;
      mx = max(mx, mark[sum]);
    }
  }
  cout << mx << endl;
  return 0;
}
