#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
int n, m, x, d, l, r, a, b;
long long ans;
long long f(long long n) { return (n - 1) * n / 2; }
int main() {
  for (scanf("%d%d", &n, &m); m--;) {
    scanf("%d%d", &x, &d);
    if (d >= 0)
      ans += f(n) * d;
    else {
      a = n / 2;
      b = n - a;
      l = min(a, b);
      r = max(a, b);
      ans += (f(l + 1) + f(r)) * d;
    }
    ans += x * n;
  }
  printf("%.12lf\n", 1.0 * ans / n);
}
