#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long ans = 0;
  long long freq[200005] = {0};
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; j++) {
      freq[arr[i] + arr[j]]++;
      ans = max(ans, freq[arr[i] + arr[j]]);
    }
  }
  cout << ans;
  return 0;
}
