#include <bits/stdc++.h>
using namespace std;
long long fun(long long n) { return ((n * (n - 1)) / 2); }
int main() {
  long long n, m, x, d;
  scanf("%lld %lld", &n, &m);
  long long sum = 0;
  for (long long i = 1; i <= m; i++) {
    scanf("%lld %lld", &x, &d);
    sum += (x * n);
    if (d > 0) {
      sum = sum + (d * fun(n));
    } else if (d < 0) {
      if (n % 2 == 0)
        sum = sum + d * (fun(1 + (n / 2)) + fun(n / 2));
      else
        sum = sum + d * (fun(1 + (n / 2)) + fun(1 + (n / 2)));
    }
  }
  double ans = (double)sum / n;
  cout << setprecision(15) << fixed << ans << endl;
  return 0;
}
