#include <bits/stdc++.h>
using namespace std;
map<int, int> s;
int a[2000];
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      int sum = a[i] + a[j];
      if (s.find(sum) == s.end())
        s[sum] = 1;
      else
        s[sum]++;
    }
  }
  int ans = 0;
  for (auto i : s) {
    ans = max(ans, i.second);
  }
  cout << ans << endl;
  return 0;
}
