#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, x, d, i, ans = 0;
  cin >> n >> m;
  while (m--) {
    cin >> x >> d;
    if (d >= 0)
      ans += x * n + d * (n - 1) * n / 2;
    else
      ans += x * n + d * (n - (n + 1) / 2) * ((n + 1) / 2);
  }
  printf("%.8f\n", ans * 1.0 / n);
  return 0;
}
