#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long x, d;
long long last = 0;
int main() {
  scanf("%I64d %I64d", &n, &m);
  for (long long i = 1; i <= m; i++) {
    scanf("%I64d %I64d", &x, &d);
    if (d < 0) {
      if (n & 1) {
        last += d * (n / 2) * (n / 2 + 1);
      } else {
        last += d * (((n - 1) / 2) * ((n - 1) / 2 + 1) + n / 2);
      }
    } else
      last += d * n * (n - 1) / 2;
    last += n * x;
  }
  printf("%.15lf\n", (double)((double)last / (double)n));
  return 0;
}
