#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  long long sum = 0, sum2 = -10e8;
  while (m--) {
    long long p, q;
    cin >> p >> q;
    if (q >= 0) {
      long long temp = p * n + q * ((n * (n - 1)) / 2);
      sum += temp;
    } else {
      long long temp;
      if (n % 2 != 0) {
        temp = p * n + q * ((long long)(n / 2) * ((n / 2) + 1));
      } else {
        temp = p * n + (q * n * n) / 4;
      }
      sum += temp;
    }
  }
  double ans = (double)sum / n;
  cout << fixed << setprecision(8) << ans << endl;
}
