counting algorithm

welcome to shbcf.ru