1st task for Summer Java courses at university.