#include <bits/stdc++.h>
using namespace std;
int solve() {
  long long n, m;
  cin >> n >> m;
  long long mean = 0, mx = -1, mn = (long long)1e18;
  for (long long int i = 0; i < n; i++) {
    long long val = (n * (n - 1)) / 2 - i * (n - i - 1);
    mx = max(mx, val);
    mn = min(mn, val);
  }
  for (long long int i = 0; i < m; i++) {
    long long x, d;
    cin >> x >> d;
    mean += x * n;
    if (d > 0)
      mean += mx * d;
    else
      mean += mn * d;
  }
  double ans = (double)mean / (double)n;
  cout << setprecision(20) << ans << "\n";
  return 0;
}
int main() {
  auto start = chrono::high_resolution_clock::now();
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long test_cases = 1;
  while (test_cases--) solve();
  auto stop = chrono::high_resolution_clock::now();
  auto duration = chrono::duration_cast<chrono::milliseconds>(stop - start);
}
