#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int i, j, k, n, m, t, sum = 0, ans = 0;
  bool f = 0, flag = 0;
  long long int y, x, d;
  cin >> n >> m;
  while (m--) {
    cin >> x >> d;
    sum += (x * n);
    y = (n * (n - 1)) / 2;
    if (d >= 0)
      ans += (d * y);
    else {
      long long int al = 0;
      al = (n / 2);
      if (n % 2 == 1) {
        al++;
        y = al * (al - 1);
        ans += (d * y);
      } else {
        y = al * (al - 1) / 2;
        y += (al * (al + 1) / 2);
        ans += (d * y);
      }
    }
  }
  sum += ans;
  cout << fixed << setprecision(16) << (sum * 1.0) / (1.0 * n) << endl;
  return 0;
}
