#include <bits/stdc++.h>
using namespace std;
long long n, m;
int x, d;
long long cnt[int(1e5 + 9)], mean;
int main() {
  scanf("%I64d %I64d", &n, &m);
  cnt[1] = 0;
  cnt[2] = 1;
  for (int i = 3; i <= n; i++) cnt[i] = cnt[i - 1] + i / 2;
  while (m--) {
    scanf("%d %d", &x, &d);
    mean += x * n;
    if (d > 0)
      mean += d * n * (n - 1) / 2;
    else
      mean += d * cnt[n];
  }
  printf("%.7f", double(mean) / n);
  return 0;
}
