#include <iostream>
using namespace std; // consider removing this line in serious projects
class C
{
public:
C()
{
cout<<++c<<endl;
}
static int Getc()
{ return c;}
~C()
{
cout<<c--<<endl;
}
private:
static int c;
};
int C::c=0;
int main()
{
C c1,c2,c3,c4,c5;
cout<<C::Getc()<<endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOyAvLyBjb25zaWRlciByZW1vdmluZyB0aGlzIGxpbmUgaW4gc2VyaW91cyBwcm9qZWN0cwpjbGFzcyBDCnsKcHVibGljOgoJQygpCgl7Cgljb3V0PDwrK2M8PGVuZGw7Cn0Kc3RhdGljIGludCBHZXRjKCkKeyByZXR1cm4gYzt9Cn5DKCkKewoJY291dDw8Yy0tPDxlbmRsOwp9CnByaXZhdGU6CnN0YXRpYyBpbnQgYzsKfTsKaW50IEM6OmM9MDsKaW50IG1haW4oKQp7CglDIGMxLGMyLGMzLGM0LGM1OwoJY291dDw8Qzo6R2V0YygpPDxlbmRsOwp9