#include <bits/stdc++.h>
using namespace std;
void read(int &k) {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  k = x * f;
}
long long n, m;
long long sum;
int main() {
  scanf("%I64d%I64d", &n, &m);
  for (int i = 1; i <= m; i++) {
    long long x, d;
    scanf("%I64d%I64d", &x, &d);
    sum += x * n;
    if (d >= 0)
      sum += d * (n - 1) * n / 2;
    else {
      if (n % 2) {
        long long tmp = (n - 1) / 2;
        sum += d * tmp * (1 + tmp);
      } else {
        long long tmp = (n - 2) / 2;
        sum += d * tmp * (1 + tmp);
        sum += d * abs(n - (1 + n) / 2);
      }
    }
  }
  printf("%.7lf\n", sum * 1.0 / n);
  return 0;
}
