#include <bits/stdc++.h>
using namespace std;
using std::string;
int main() {
  long long n, m, ex = 0, tot = 0;
  cin >> n >> m;
  while (m--) {
    int x, d;
    cin >> x >> d;
    ex += x;
    if (d > 0)
      tot += (n * (n + 1) / 2 - n) * d;
    else {
      long long mid = (n + 1) / 2;
      if (n % 2 == 1) {
        mid -= 1;
        tot += (mid * (mid + 1) / 2) * d * 2;
      } else {
        tot += ((mid * (mid + 1) / 2) * 2 - mid) * d;
      }
    }
  }
  tot += ex * n;
  double ans = 0.0;
  ans = (double)tot / (double)n;
  printf("%.7lf", ans);
}
