func_code_string: #include <bits/stdc++.h>   class big_integer {    public:     big_integer(int32_t v) {       if (v >= base) {         data_.push_back(v % base);         data_.push_back(v / base);       } else {         data_.push_back(v);       }     }     void inc() {       int32_t carry = 1;       size_t ptr = 0;       while (carry != 0 && ptr < data_.size()) {         data_[ptr] += 1;         if (data_[ptr] == base) {           data_[ptr] -= base;         } else {           carry = 0;         }         ptr += 1;       }       if (carry != 0) {         data_.push_back(carry);       }     }     void mult2() {       int32_t carry = 0;       for (size_t i = 0; i < data_.size(); ++i) {         data_[i] = data_[i] * 2 + carry;         if (data_[i] >= base) {           data_[i] -= base;           carry = 1;         } else {           carry = 0;         }       }       if (carry != 0) {         data_.push_back(carry);       }     }     void print(std::ostream& os) const {       os << data_.back();       for (size_t i = data_.size() - 2; i < data_.size(); --i) {         os << std::setw(9) << std::setfill( 0 ) << data_[i];       }     }       private:     std::vector<int32_t> data_;     static const int32_t base = 1000000000;     big_integer() {}   };   struct operation {     std::string op;     int32_t x;   };   std::istream& operator>>(std::istream& is, operation& o) {     return is >> o.op >> o.x;   }   int main() {     std::ios::sync_with_stdio(false);     std::cin.tie(nullptr);     size_t n;     std::cin >> n;     std::vector<operation> ops(n);     std::vector<size_t> poss(2001, n);     for (size_t i = 0; i < n; ++i) {       std::cin >> ops[i];       if (ops[i].op ==  sell ) {         poss[ops[i].x] = i;       }     }     std::vector<int32_t> used(n);     big_integer result(0);     for (int32_t i = 2000; i >= 0; --i) {       result.mult2();       if (poss[i] == n) {         continue;       }       size_t pos = poss[i];       while (pos < n) {         if (used[pos] || (ops[pos].op ==  win  && ops[pos].x == i)) {           break;         }         pos -= 1;       }       if (pos < n && !used[pos]) {         for (size_t j = pos; j <= poss[i]; ++j) {           used[j] = 1;         }         result.inc();       }     }     result.print(std::cout);     std::cout <<   n ;   }   