#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, x, ans = 1, y;
  map<int, int> m;
  map<int, int>::iterator p;
  vector<int> v, t;
  cin >> n;
  for (int(q) = 0; (q) < (n); (q)++) {
    cin >> x;
    v.push_back(x);
  }
  for (int(q) = 0; (q) < (n); (q)++) {
    for (int i = q + 1; i < n; i++) {
      y = v[q] + v[i];
      p = m.find(y);
      if (p != m.end()) {
        p->second++;
        ans = max(p->second, ans);
      } else
        m.insert(pair<int, int>(y, 1));
    }
  }
  cout << ans << endl;
}
