#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5, Sum = 2e5 + 5;
int a[N], n, cnt[Sum];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int max_cnt = 0;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      int cur_sum = a[i] + a[j];
      cnt[cur_sum]++;
      max_cnt = max(max_cnt, cnt[cur_sum]);
    }
  cout << max_cnt << endl;
  return 0;
}
