#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll sumto(ll x) { return (x * (x + 1)) / 2; }
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  ll sum = 0;
  for (int i = 0; i < m; i++) {
    ll x, d;
    cin >> x >> d;
    sum += x * n;
    if (d == 0) continue;
    if (d > 0) {
      sum += d * sumto(n - 1);
    }
    if (d < 0) {
      sum += 2 * d * sumto((n - 1) / 2);
      if (n % 2 == 0) {
        sum += d * (n / 2);
      }
    }
  }
  cout << fixed << setprecision(9) << (double)sum / (double)n << "\n";
  return 0;
}
