#include <bits/stdc++.h>
using namespace std;
vector<double> solve(vector<pair<int, int>> &q) {
  vector<int> S;
  long long sum = 0;
  int c = 0;
  vector<double> ans;
  for (auto &e : q) {
    if (e.first == 1) {
      S.push_back(e.second);
      while (c < int(S.size()) - 1 && 1ll * S[c] * (1 + c) < sum + S.back()) {
        sum += S[c];
        c++;
      }
    } else {
      ans.push_back(S.back() - 1.0 * (S.back() + sum) / (c + 1));
    }
  }
  return ans;
}
int main() {
  int n;
  cin >> n;
  vector<pair<int, int>> q(n);
  for (auto &e : q) {
    cin >> e.first;
    if (e.first == 1) {
      cin >> e.second;
    }
  }
  auto ans = solve(q);
  cout.precision(10);
  cout.setf(ios::fixed);
  for (auto &e : ans) {
    cout << e << "\n";
  }
  return 0;
}
