#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 123;
const int p = 37;
long long n, m, a[N], summ, need, minn, pl;
int main() {
  cin >> n >> m;
  for (long long i = 1; i <= m; ++i) {
    long long x, d, now;
    cin >> x >> d;
    if (d < 0)
      minn += d;
    else
      pl += d;
    need += x;
  }
  for (long long i = 1; i <= n; ++i)
    a[i] = need + pl * abs(1 - i) + minn * abs((n >> 1) + 1 - i);
  for (long long i = 1; i <= n; ++i) summ += a[i];
  cout.precision(12);
  cout << (summ + 0.000000000000) / (n + 0.000000000000);
  return 0;
}
