Solution of homework 1