#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int inp[n];
  for (int i = 0; i < n; i++) cin >> inp[i];
  int c = 0;
  int sum[201000] = {0};
  int max = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      sum[inp[i] + inp[j]]++;
      if (sum[inp[i] + inp[j]] > max) {
        max = sum[inp[i] + inp[j]];
      }
    }
  }
  cout << max;
  return 0;
}
