hello, help me to get this algorithm please