#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m[200001] = {0}, j;
  cin >> n;
  int a[n], i;
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < n; i++)
    for (j = i + 1; j < n; j++) m[(a[i] + a[j])]++;
  cout << *max_element(m, m + 200001);
  return 0;
}
