#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  vector<long long> v;
  int q;
  cin >> q;
  long long pos = 0;
  long long sum = 0;
  double best = 0;
  while (q--) {
    int t;
    cin >> t;
    if (t == 1) {
      long long x;
      cin >> x;
      v.push_back(x);
      while (pos + 1 < v.size() &&
             (x + sum) * (pos + 2) >= (x + sum + v[pos]) * (pos + 1))
        sum += v[pos++];
      best = max(best, x - (x + sum) * 1.0 / (pos + 1));
    } else {
      cout << fixed << setprecision(20) << best << "\n";
    }
  }
}
