#include <bits/stdc++.h>
using namespace std;
int n, a[1000005], ans, s[1005];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> s[i];
    for (int j = 1; j < i; j++) {
      a[s[i] + s[j]]++;
      ans = max(a[s[i] + s[j]], ans);
    }
  }
  cout << ans;
}
