#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m;
  cin >> n >> m;
  long long MAX = 0, MIN = 1e18, sum = 0;
  for (int i = 1; i <= n; ++i) {
    long long temp = 0, x = i - 1, y = n - i;
    temp += (x * (x + 1)) / 2;
    temp += (y * (y + 1)) / 2;
    MAX = max(MAX, temp);
    MIN = min(MIN, temp);
  }
  while (m--) {
    long long x, d;
    cin >> x >> d;
    sum += n * x;
    if (d < 0LL)
      sum += (MIN * d);
    else
      sum += (MAX * d);
  }
  long double ans = (long double)sum / (long double)n;
  cout << setprecision(10) << fixed << ans << '\n';
  return 0;
}
