#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
enum { MOD0 = 1000000000, MOD7 = 1000000007, MOD9 = 1000000009 };
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  long long n, m;
  cin >> n >> m;
  long long ans = 0;
  const long long mx = n * (n - 1) / 2;
  const long long mi = n / 2;
  const long long ma = n - 1 - mi;
  const long long mn = mi * (mi + 1) / 2 + ma * (ma + 1) / 2;
  int x, d;
  for (int i = 0; i < m; ++i) {
    cin >> x >> d;
    ans += n * x;
    if (d >= 0) {
      ans += mx * d;
    } else {
      ans += mn * d;
    }
  }
  cout << fixed << setprecision(10) << (long double)ans / n << '\n';
  return 0;
}
