#include <bits/stdc++.h>
using namespace std;
long long n, m, x, d, h, s;
int main() {
  cin >> n >> m;
  while (m--) {
    cin >> x >> d;
    s += n * x;
    if (d >= 0)
      s += d * (n * (n - 1)) / 2;
    else
      s += d * (n / 2) * (n / 2) + d * (n % 2) * (n / 2);
  }
  cout << setprecision(10) << (s * 1.0) / (n * 1.0);
  return 0;
}
