#include <bits/stdc++.h>
using namespace std;
map<long long, long long> mp;
map<long long, long long>::iterator it;
int main() {
  long long tc, num, t = 1, pownum;
  scanf("%lld", &num);
  long long arr[num];
  for (long long i = 0; i < num; i++) scanf("%lld", &arr[i]);
  sort(arr, arr + num);
  for (long long i = 0; i < num - 1; i++) {
    for (long long j = i + 1; j < num; j++) {
      mp[arr[i] + arr[j]]++;
    }
  }
  long long ans = 0;
  for (it = mp.begin(); it != mp.end(); it++) {
    ans = max(ans, it->second);
  }
  printf("%lld\n", ans);
  return 0;
}
