#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, sum = 0, k1 = 0, k2 = 0;
  cin >> n >> m;
  k1 = n * (n - 1) / 2;
  if (n % 2 == 1)
    k2 = (1 + n / 2) * (n / 2);
  else
    k2 = (n / 2) * (n / 2);
  for (int i = 0; i < m; i++) {
    long long x, d;
    cin >> x >> d;
    sum += n * x;
    if (d > 0)
      sum += k1 * d;
    else
      sum += k2 * d;
  }
  cout.precision(20);
  cout << fixed << ((long double)sum) / ((long double)n);
  return 0;
}
