#include <bits/stdc++.h>
using namespace std;
int a[100005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  cout.precision(10);
  long long x, d;
  long long sum = 0;
  for (int j = 1; j <= m; j++) {
    cin >> x >> d;
    if (d > 0) {
      double nn = n;
      sum = sum + x * nn + d * (nn - 1) * nn / 2;
    } else {
      if (n % 2 == 1) {
        double nn = n;
        sum = sum + x * nn + (nn - 1) * (nn + 1) / 4 * d;
      } else {
        double nn = n;
        sum = sum + x * n + d * n * n / 4;
      }
    }
  }
  double ans = sum;
  double col = n;
  ans = ans / col;
  cout << fixed << ans << "\n";
  return 0;
}
