#include <bits/stdc++.h>
using namespace std;
class Solution {
 public:
  double maxMean(long long n,
                 const vector<pair<long long, long long>>& changes) {
    long long sum = 0;
    long long maxdissum = sum_from_0(n - (long long)1);
    long long mindissum = (long long)0;
    if (n > 1 && n % (long long)2 == (long long)0)
      mindissum = sum_from_0(n / (long long)2) +
                  sum_from_0(n / (long long)2 - (long long)1);
    else if (n > 1 && n % (long long)2 == (long long)1)
      mindissum = (long long)2 * sum_from_0(n / (long long)2);
    for (const pair<int, int>& p : changes) {
      sum += n * p.first;
      if (p.second >= (long long)0)
        sum += p.second * maxdissum;
      else
        sum += p.second * mindissum;
    }
    return (double)sum / n;
  }

 private:
  long long sum_from_0(long long n) {
    return n * (n + (long long)1) / (long long)2;
  }
};
int main() {
  int n, m;
  cin >> n >> m;
  int x, d;
  vector<pair<long long, long long>> changes;
  while (m--) {
    cin >> x >> d;
    changes.push_back(make_pair(x, d));
  }
  cout << setprecision(15) << Solution().maxMean((long long)n, changes) << endl;
  return 0;
}
