#include <bits/stdc++.h>
using namespace std;
long double f(long long i) { return (1.0 * (i) * (i + 1)) / 2.0; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long i, j, n, m, k, cnt = 0, ans = 0, t = 1;
  cin >> n >> m;
  long double val = 0.0;
  for (i = 0; i < m; i++) {
    long double x, d;
    cin >> x >> d;
    val += x * n;
    if (d > 0)
      val += (d * f(n - 1));
    else
      val += (d * f(n / 2 - 1 + n % 2)) + (d * f(n / 2));
  }
  cout << setprecision(8) << fixed << val / n;
  return 0;
}
