#include <iostream>
using namespace std;
int *make(int v) {
int *p = new int;
*p = v + 1;
return p;
}
int *play(int &v) {
cout << ++v;
return &v;
}
void remove(int *v) {
delete v;
}
int main() {
remove(play(*make(3)));
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogICAgCmludCAqbWFrZShpbnQgdikgewogICAgaW50ICpwID0gbmV3IGludDsKICAgICpwID0gdiArIDE7CiAgICByZXR1cm4gcDsKfQppbnQgKnBsYXkoaW50ICZ2KSB7CiAgICBjb3V0IDw8ICsrdjsKICAgIHJldHVybiAmdjsKfQogICAgCnZvaWQgcmVtb3ZlKGludCAqdikgewogICAgZGVsZXRlIHY7Cn0KICAgIGludCBtYWluKCkgewogICAgcmVtb3ZlKHBsYXkoKm1ha2UoMykpKTsKICAgIHJldHVybiAwOwp9Cgo=