#include <bits/stdc++.h>
using namespace std;
long double max(long double a, long double b) {
  if (a > b)
    return a;
  else
    return b;
}
int main() {
  long long int n, m, x, y;
  cin >> n >> m;
  long long sum = 0;
  long double ans = -1000000000;
  sum = 0;
  long double avg;
  for (long int i = 0; i < m; i++) {
    cin >> x >> y;
    if ((x >= 0 && y >= 0) || (x <= 0 && y >= 0)) {
      sum += (n * x) + y * (n) * (n - 1) / 2;
      avg = (long double)(sum) / n;
    } else {
      sum += (n * x);
      if (n % 2 == 1) {
        sum += y * ((n / 2) * (n / 2 + 1));
      } else {
        sum += y * (((n / 2) * (n / 2 + 1)) - n / 2);
      }
      avg = (long double)(sum) / n;
    }
  }
  cout << setprecision(10) << fixed << avg;
}
