#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m, sum = 00.00;
  cin >> n >> m;
  long long mean = 0.0;
  for (long long int i = 0; i < m; i++) {
    long long x, y;
    cin >> x >> y;
    if (y >= 0) {
      sum += n * x + y * ((n - 1) * n) / 2;
    } else {
      sum += n * x;
      long long int k = n / 2, o = 0;
      if (n % 2 == 0) {
        o = k * (k + 1) - k;
      } else
        o = k * (k + 1);
      sum += o * y;
    }
  }
  double z = double(sum) / n;
  printf("%0.9f", z);
  return 0;
}
