First version calculate factor and print in console