#include <bits/stdc++.h>
using namespace std;
void re(long long &x) {
  x = 0;
  char ch = getchar();
  int b = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') b = 1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + ch - '0';
    ch = getchar();
  }
  if (b == 1) x *= -1;
}
long long n, m;
long long a[110000], b[110000], sum[110000];
long long ans;
int main() {
  re(n), re(m);
  for (register int i = 1; i <= 2 * n; i++) sum[i] = sum[i - 1] + i;
  for (register int i = 1; i <= m; i++) {
    scanf("%I64d %I64d", &a[i], &b[i]);
    if (b[i] >= 0) {
      ans = ans + n * a[i] + sum[n - 1] * b[i];
    } else {
      if (n % 2 == 0)
        ans = ans + n * a[i] + sum[n / 2] * b[i] + sum[n / 2 - 1] * b[i];
      else
        ans = ans + n * a[i] + sum[n / 2] * b[i] * 2;
    }
  }
  printf("%.8lf", (double)(ans * 1.0 / n));
  return 0;
}
