Solved task 5

Please, merge, my solved. From Rusovich Yriy..