#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
long long n, m, p1, p2, x, d;
long long Ans;
int main() {
  n = read();
  m = read();
  p1 = (n / 2 + 1) * (n / 2);
  if (n % 2 == 0) p1 -= (n / 2);
  p2 = n * (n - 1) / 2;
  for (int i = 1; i <= m; i++) {
    x = read();
    d = read();
    Ans += x * n;
    if (d > 0)
      Ans += p2 * d;
    else
      Ans += p1 * d;
  }
  printf("%.15lf\n", 1.0 * Ans / (double)n);
  return 0;
}
