#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, i, j, k, M, now, big, small, x, d, half;
  double ans;
  now = 0;
  cin >> N >> M;
  big = N * (N - 1) / 2;
  half = N / 2;
  if (N % 2 == 1) {
    small = (half + 1) * half;
  } else {
    small = (half + 1) * half - half;
  }
  for (i = 0; i < M; i++) {
    cin >> x >> d;
    now += x * N;
    if (d < 0) {
      now += d * small;
    } else {
      now += d * big;
    }
  }
  ans = double(now) / N;
  printf("%.20f\n", ans);
}
