#include <bits/stdc++.h>
using namespace std;
template <class _Tp>
_Tp gcd(_Tp a, _Tp b) {
  return (b == 0) ? (a) : (gcd(b, a % b));
}
const long long Inf = 1000000000000000000ll;
const int inf = 1000000000;
map<long long, string> mp;
long long n;
int main() {
  cin >> n;
  for (long long i = 2; i * i <= n; ++i) {
    for (long long j = i * i, k = 2; j <= n; j *= i, ++k) {
      string cur = to_string(i) + "^" + to_string(k);
      if (!mp.count(j)) mp[j] = to_string(j);
      if (cur.size() < mp[j].size()) mp[j] = cur;
    }
  }
  string ans = to_string(n);
  for (map<long long, string>::iterator it = mp.begin(); it != mp.end(); ++it) {
    string cur = "";
    long long k = n / (*it).first, b = n % (*it).first;
    if (k > 1) cur = (mp.count(k) ? mp[k] : to_string(k)) + "*";
    cur += (*it).second;
    if (b) cur += "+" + (mp.count(b) ? mp[b] : to_string(b));
    if (cur.size() < ans.size()) ans = cur;
  }
  cout << ans << endl;
  return 0;
}
