#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <typename Arg1>
void debug(const char* name, Arg1&& arg1) {
  cerr << name << " = " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void debug(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " = " << arg1;
  debug(comma, args...);
}
void c_p_c() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int32_t main() {
  c_p_c();
  long long n;
  cin >> n;
  long long* arr = new long long[n];
  ;
  for (long long i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  map<long long, long long> cnt;
  for (long long i = 0; i < n; ++i) {
    for (long long j = i + 1; j < n; ++j) cnt[arr[i] + arr[j]]++;
  }
  long long ans = 1;
  for (auto el : cnt) ans = max(ans, el.second);
  cout << ans << '\n';
  return 0;
}
