#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  long long res = 0;
  long long kpos = (n - 1) * n / 2;
  long long kneg;
  if (n % 2)
    kneg = (n * n - 1) / 4;
  else
    kneg = n * n / 4;
  for (int i = 0; i < m; ++i) {
    int x, d;
    cin >> x >> d;
    res += x * n;
    if (d > 0)
      res += kpos * d;
    else
      res += kneg * d;
  }
  printf("%0.15f", res * 1.0 / n);
  return 0;
}
