#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int inf = 1e9 + 9;
const int N = 1e5 + 5;
int n, m;
int main() {
  cin >> n >> m;
  long long mid = n / 2;
  long long mn = 0;
  for (int i = 0; i < n; ++i) {
    mn += abs(i - mid);
  }
  long long mx = n * 1ll * (n - 1) / 2;
  long double ans = 0;
  for (int i = 0; i < m; ++i) {
    int x, d;
    cin >> x >> d;
    ans += x * 1ll * n;
    if (d >= 0)
      ans += (d * 1ll * mx);
    else
      ans += (d * 1ll * mn);
  }
  cout.precision(10);
  cout << fixed << ans / (n + 0.) << endl;
}
