#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int n, m, x, d;
long long ans = 0;
long long dismax, dismin;
long long cc(int x) { return (long long)(x - 1) * x / 2; }
int main() {
  scanf("%d%d", &n, &m);
  dismax = cc(n);
  if (n & 1)
    dismin = cc((n + 1) / 2) + cc(n - ((n + 1) / 2) + 1);
  else
    dismin = cc(n / 2) + cc(n - n / 2 + 1);
  while (m--) {
    scanf("%d%d", &x, &d);
    ans += x * n;
    if (d >= 0)
      ans += (long long)d * dismax;
    else
      ans += (long long)d * dismin;
  }
  printf("%.10lf\n", (double)ans / n);
  return 0;
}
