#include <bits/stdc++.h>
using namespace std;
long long su[200001];
long long k[200001];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, mx = 0;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> k[i];
    for (long long j = 1; j < i; j++) {
      su[k[i] + k[j]]++;
      if (su[k[i] + k[j]] > mx) mx = su[k[i] + k[j]];
    }
  }
  cout << mx;
  return 0;
}
