Using this test program based on what you posted:
#include <iostream>
#include <string>
int main()
{
std::string a;
std::cin >> a;
std::cout << a.length() << std::endl;
}
I can do:
./a.out < fact100000.txt
and get the result:
456574
, "" , 4095. , - "". , , copy'n'paste, . 4 , , - . ( , , , , 450 , , ).