#include <bits/stdc++.h>
using namespace std;
long long x, d;
long double sumatoria(const long double &top) {
  return (top * (top + 1)) / 2.0;
}
int main() {
  long long numElements, numOperations;
  cin >> numElements >> numOperations;
  long long sum = 0;
  for (int h = 0; h < numOperations; h++) {
    cin >> x >> d;
    sum += x * numElements;
    if (d < 0) {
      long long temp;
      long long half = numElements / 2;
      if (int(numElements) % 2 == 0 || half + 1 > numElements) {
        temp = sumatoria(half - 1) + sumatoria(numElements - half);
      } else {
        temp = sumatoria(half) + sumatoria(numElements - half - 1);
      }
      sum += d * (temp);
    } else {
      sum += d * sumatoria(numElements - 1);
    }
  };
  printf("%.15f", double(sum) / double(numElements));
  return 0;
}
