мына сайтта 13 способ бар ))))))))))))))))))))))))
http://fixim.ru/problem/q173-%D0%B5%D1%81%D0%BB%D0%B8_%D0%BF%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%B8%D0%BB_%D0%B7%D0%B0%D1%89%D0%B8%D1%82%D0%BD%D1%8B%D0%B9_%D0%BA%D0%BE%D0%B4_%D0%B8_%D0%B7%D0%B0%D0%B1%D1%8B%D0%BB_%D0%B5%D0%B3%D0%BE_%D1%87%D1%82%D0%BE#solutions
http://fixim.ru/problem/q173-%D0%B5%D1%81%D0%BB%D0%B8_%D0%BF%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%B8%D0%BB_%D0%B7%D0%B0%D1%89%D0%B8%D1%82%D0%BD%D1%8B%D0%B9_%D0%BA%D0%BE%D0%B4_%D0%B8_%D0%B7%D0%B0%D0%B1%D1%8B%D0%BB_%D0%B5%D0%B3%D0%BE_%D1%87%D1%82%D0%BE#solutions