#include <bits/stdc++.h>
using namespace std;
typedef priority_queue<int, vector<int>, greater<int>()> p_que_rev;
const int INF = INT_MAX;
const long long LINF = LLONG_MAX;
const int MOD = 1000000000 + 7;
const double EPS = 1e-9;
const double PI = acos(-1);
const int di[]{0, -1, 0, 1, -1, -1, 1, 1};
const int dj[]{1, 0, -1, 0, 1, -1, -1, 1};
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  vector<long long> a(n);
  set<long long> num;
  multiset<long long> size;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  long long ans = -1;
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      num.insert(a[i] + a[j]);
      size.insert(a[i] + a[j]);
    }
  }
  for (auto itr = num.begin(); itr != num.end(); ++itr) {
    long long k = size.count(*itr);
    ans = max(k, ans);
  }
  cout << ans << endl;
  return 0;
}
