#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.141;
int main() {
  int arr[1005], n, s = 0, max = -1;
  map<int, int> m;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = 0; i < n - 1; i++)
    for (int j = i + 1; j < n; j++) {
      s = arr[i] + arr[j];
      m[s]++;
      if (m[s] > max) {
        max = m[s];
      }
    }
  cout << max;
}
