#include<bits/stdc++.h>

using namespace std;

ofstream f1("TSNT.OUT");
void PhanTich(int n)
{f1<<n<<"=";
    for (int i = 2, count = 0; i <= n; i++)
        for (; n % i == 0; n /= i)
    		f1 <<(count++ ? "*" : "") << i;
}

int main()
{
	ifstream f("TSNT.INP");
	int n;
int kqua=0;
	f>>n;
	PhanTich(n);
	for (int i = 2; i <= n; i++)
        for (; n % i == 0; n /= i)
        {kqua=kqua+i;}
	f1<<endl<<kqua;
	return 0;
	f.close();
	f1.close();
}


