#include <bits/stdc++.h>
using namespace std;
void fileio() {}
vector<vector<long long>> g;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  fileio();
  long long n, m;
  cout << fixed << setprecision(15);
  cin >> n >> m;
  long long sum = 0;
  long long val = 1e18, res = 0, val2 = 0;
  for (long long i = 0; i < n; i++) {
    res += abs(n / 2 - i);
    val2 += (n - 1 - i);
  }
  val = min(res, val);
  for (long long i = 0; i < m; i++) {
    long long x, d;
    cin >> x >> d;
    sum += n * x;
    if (d > 0) {
      sum += (val2) * (d);
    } else {
      sum += val * d;
    }
  }
  double avg = ((double)sum / (double)n);
  cout << avg;
  cout << '\n';
  return 0;
}
