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