#include <bits/stdc++.h>
using namespace std;
int n, m;
long long now = 0;
long long x, d;
void upd(long long pos) {
  now += pos * (pos - 1) / 2 * d;
  now += (n - pos + 1) * (n - pos) / 2 * d;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> x >> d;
    now += x * n;
    if (d > 0)
      upd(1);
    else
      upd(n / 2 + 1);
  }
  printf("%.7lf\n", 1.0 * now / n);
  return 0;
}
