#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
long long num[500005], pres[500005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int cur = 1, q = 0;
  long double ans = 0.0;
  cin >> q;
  while (q--) {
    int t;
    cin >> t;
    if (t == 1) {
      cin >> num[cur];
      pres[cur] = pres[cur - 1] + num[cur];
      int l = 1, r = cur;
      while (l < r) {
        int mid = (l + r) >> 1;
        if (pres[mid] + num[cur] > num[mid] * (mid + 1))
          l = mid + 1;
        else
          r = mid;
      }
      ans = max(ans, num[cur] - (long double)(pres[r - 1] + num[cur]) / r);
      cur++;
    } else
      cout << fixed << setprecision(10) << ans << '\n';
  }
  cout << flush;
  return 0;
}
