#include <cstdlib>
#include <iostream>
#include <vector>
#include <cstring>
#include <cassert>
#include <cstdio>
#include <algorithm>
using namespace std;
typedef long long ll;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef tree<
double,
int,
less<double>,
rb_tree_tag,
tree_order_statistics_node_update> map_t;
int main() {
map_t s;
s.insert(make_pair(12, 1012));
s.insert(make_pair(505, 1505));
s.insert(make_pair(30, 1030));
cout << s.find_by_order(1)->second << '\n';
return 0;
}
I2luY2x1ZGUgPGNzdGRsaWI+IAojaW5jbHVkZSA8aW9zdHJlYW0+CiNpbmNsdWRlIDx2ZWN0b3I+IAojaW5jbHVkZSA8Y3N0cmluZz4gCiNpbmNsdWRlIDxjYXNzZXJ0PgojaW5jbHVkZSA8Y3N0ZGlvPiAKI2luY2x1ZGUgPGFsZ29yaXRobT4gCnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp0eXBlZGVmIGxvbmcgbG9uZyBsbDsKCiNpbmNsdWRlIDxleHQvcGJfZHMvYXNzb2NfY29udGFpbmVyLmhwcD4gCiNpbmNsdWRlIDxleHQvcGJfZHMvdHJlZV9wb2xpY3kuaHBwPgoKdXNpbmcgbmFtZXNwYWNlIF9fZ251X3BiZHM7Cgp0eXBlZGVmIHRyZWU8IApkb3VibGUsIAppbnQsIApsZXNzPGRvdWJsZT4sIApyYl90cmVlX3RhZywgCnRyZWVfb3JkZXJfc3RhdGlzdGljc19ub2RlX3VwZGF0ZT4gbWFwX3Q7CgppbnQgbWFpbigpIHsgCgoKICAgIG1hcF90IHM7IAogICAgcy5pbnNlcnQobWFrZV9wYWlyKDEyLCAxMDEyKSk7IAogICAgcy5pbnNlcnQobWFrZV9wYWlyKDUwNSwgMTUwNSkpOyAKICAgIHMuaW5zZXJ0KG1ha2VfcGFpcigzMCwgMTAzMCkpOwoKICAgIGNvdXQgPDwgcy5maW5kX2J5X29yZGVyKDEpLT5zZWNvbmQgPDwgJ1xuJzsKICAgIHJldHVybiAwOyAKCn0=