#include <bits/stdc++.h>
using namespace std;
map<long long, string> mp;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  long long i, j;
  long long k;
  cin >> n;
  for (i = 2; i * i <= n; ++i) {
    for (j = i * i, k = 2; j <= n; ++k, j *= i) {
      string t = to_string(i) + "^" + to_string(k);
      if (mp.count(j) == 0) {
        mp[j] = to_string(j);
      }
      if (t.size() < mp[j].size()) {
        mp[j] = t;
      }
    }
  }
  string ans = to_string(n);
  for (auto& ii : mp) {
    string t = "";
    long long a = n / ii.first, b = n % ii.first;
    if (a > 1) {
      if (mp.count(a)) {
        t = mp[a] + "*";
      } else
        t = to_string(a) + "*";
    }
    t += ii.second;
    if (b > 0) {
      t += "+";
      if (mp.count(b))
        t += mp[b];
      else
        t += to_string(b);
    }
    if (t.size() < ans.size()) ans = t;
  }
  cout << ans << endl;
  return 0;
}
