#include <fstream>
using namespace std;
ifstream f1("tsnt.inp");
ofstream f2("tsnt.out");
long long n;
void ra(long long n)
{
    long long a = 1,tong = 0;
    while (n > 1)
    {
        if (n == a) {f2 << a;tong = tong + a;n = n / a;}
        if (n%a == 0 && n != a) {f2 << a << "*";tong = tong + a;n = n / a;}
        else a++;
    }
    f2 << endl << tong;
}
int main()
{
    f1 >> n;
    f2 << n << " = ";
    long long a = 2, tong = 0;
    while (n != 1)
    {
        if (n == a) {f2 << a;tong = tong + a;n = n / a;}
        if (n%a == 0 && n != a) {f2 << a << "*";tong = tong + a;n = n / a;}
        else a++;
    }
    f2 << endl << tong;;
    return 0;
}
