First exercise on MTA C++ course