#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int main() {
  int i, n, m, x, d, j;
  long long ans = 0, cnt = 0, sum = 0, summ = 0;
  scanf("%d%d", &n, &m);
  if (n % 2 == 1)
    cnt = n / 2;
  else
    cnt = n / 2 - 1;
  for (j = 1; j < n; j++) summ += 1ll * j;
  for (j = 1; j <= cnt; j++) sum += 2ll * j;
  if (n % 2 == 0) sum += j;
  for (i = 0; i < m; i++) {
    scanf("%d%d", &x, &d);
    ans += 1ll * x * n;
    if (d < 0) {
      ans += sum * d;
    }
    if (d > 0) ans += summ * d;
  }
  printf("%.6f", ans / 1.0 / n);
}
