#include <bits/stdc++.h>
using namespace std;
long long n, m, k, a[100100], sums[200200], c, cnt, i, j;
set<long long> se;
int main() {
  cin >> n;
  for (i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) sums[a[i] + a[j]]++;
  for (int i = 0; i <= 200100; i++) cnt = max(cnt, sums[i]);
  cout << cnt;
  return 0;
}
