#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long ans = 0;
int main() {
  cin >> n >> m;
  double part1 = 0;
  for (int i = 0; i < m; i++) {
    int x, d;
    scanf("%d %d", &x, &d);
    part1 += x;
    if (d > 0) {
      ans += n * (n - 1) / 2 * d;
    }
    if (d < 0) {
      long long half = n / 2;
      long long half2 = n - half - 1;
      ans += (1 + half) * half / 2 * d;
      ans += (1 + half2) * half2 / 2 * d;
    }
  }
  printf("%.10f\n", (double)ans / n + part1);
  return 0;
}
