Calculator for long numbers, homework for HSE AMI 2013