#include <bits/stdc++.h>
using namespace std;
unordered_map<int, int> ans;
unordered_map<int, int> m[1002];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  int n, res = 0;
  cin >> n;
  int a[n + 2];
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= i - 1; j++)
      if (i != j and m[i].find((a[i] + a[j])) == m[i].end() and
          m[j].find((a[i] + a[j])) == m[j].end())
        ans[(a[i] + a[j])]++, m[i][(a[i] + a[j])] = 1, m[j][(a[i] + a[j])] = 1;
  for (auto u : ans) res = max(u.second, res);
  cout << res;
}
