#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  long long hi = 0, lo = 0;
  for (int i = 0; i < n; i++) {
    hi += abs(i);
    lo += abs(i - (n / 2));
  }
  long long sum = 0;
  for (int i = 0; i < m; i++) {
    int x, d;
    cin >> x >> d;
    if (d < 0) {
      sum += (d * lo) + (x * n);
    } else {
      sum += (d * hi) + (x * n);
    }
  }
  cout << fixed << setprecision(12) << 1.0 * sum / n << endl;
  return 0;
}
