#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, m, x, d;
  cin >> n >> m;
  long long mx = 1LL * (n - 1) * n / 2, mn, nn = n / 2;
  if (n % 2 == 0)
    mn = 1LL * nn * (nn + 1) / 2 + 1LL * (nn - 1) * nn / 2;
  else
    mn = 1LL * (nn) * (nn + 1) / 2 * 2;
  long long ans = 0, tot = 0;
  for (int i = 0; i < m; i++) {
    cin >> x >> d;
    if (d < 0)
      tot += 1LL * x * n + 1LL * mn * d;
    else
      tot += 1LL * x * n + 1LL * mx * d;
  }
  cout << fixed << setprecision(10) << (double)tot / n << endl;
  return 0;
}
