#include <bits/stdc++.h>
using namespace std;
const int maxn = 10005;
int a[maxn];
map<long long, long long> mp;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      long long sum = a[i] + a[j];
      mp[sum]++;
    }
  }
  map<long long, long long>::iterator it;
  int mx = 0;
  for (it = mp.begin(); it != mp.end(); it++) {
    int x = it->second;
    mx = max(x, mx);
  }
  cout << mx << endl;
  return 0;
}
