#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long delta;
long long x;
long long d;
long long mid, sum1, sum2;
int main() {
  scanf("%lld%lld", &n, &m);
  if (n % 2 == 0) {
    mid = n / 2;
    sum1 = (mid + 1) * mid / 2 + mid * (mid - 1) / 2;
  } else {
    mid = n / 2;
    sum1 = (mid + 1) * mid;
  }
  sum2 = (n - 1) * n / 2;
  for (int i = 1; i <= m; i++) {
    scanf("%I64d%I64d", &x, &d);
    delta += x * n;
    if (d >= 0)
      delta += d * sum2;
    else
      delta += d * sum1;
  }
  printf("%.15lf", (double)delta / n);
}
