#include <bits/stdc++.h>
using namespace std;
map<long long, string> mp;
int main() {
  std::ios::sync_with_stdio(false);
  long long n;
  while (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 dns = to_string(i) + "^" + to_string(k);
        if (!mp.count(j)) mp[j] = to_string(j);
        if (dns.size() < mp[j].size()) mp[j] = dns;
      }
    }
    string ans = to_string(n);
    for (auto x : mp) {
      string dns = "";
      long long cnt = n / x.first, mo = n % x.first;
      if (cnt > 1) {
        dns = (mp.count(cnt) ? mp[cnt] : to_string(cnt)) + "*";
      }
      dns += x.second;
      if (mo) {
        dns += "+" + (mp.count(mo) ? mp[mo] : to_string(mo));
      }
      if (dns.size() < ans.size()) ans = dns;
    }
    cout << ans << endl;
  }
}
