#include <bits/stdc++.h>
using namespace std;
long long n, p[10] = {1};
set<long long> st[10];
map<long long, string> mp;
string ans;
string tostring(long long x) {
  string ret = "";
  while (x) {
    ret += x % 10 + '0';
    x /= 10;
  }
  reverse(ret.begin(), ret.end());
  return ret;
}
string get(long long x) {
  if (!mp.count(x)) return tostring(x);
  return mp[x];
}
void fixans(string s) {
  if (s.size() < ans.size()) ans = s;
}
void fix(long long x, string s) {
  if (x > n || get(x).size() <= s.size()) return;
  st[get(x).size()].erase(x);
  st[s.size()].insert(x);
  mp[x] = s;
}
int main() {
  for (int i = 1; i < 10; i++) p[i] = 10 * p[i - 1];
  scanf("%lld", &n);
  for (long long i = 2; i * i <= n; i++) {
    long long d = i;
    int p = 1;
    while (d * i * 1.0 <= n) {
      d *= i;
      p++;
      fix(d, tostring(i) + "^" + tostring(p));
    }
  }
  for (int a = 1; a < 7; a++)
    for (int b = a; b + a - 1 < 7; b++)
      for (auto i : st[a])
        for (auto j : st[b]) fix(i * j, get(i) + "*" + get(j));
  for (int a = 1; a < 7; a++)
    for (int b = 1; b < p[7 - a - 1]; b++)
      for (auto i : st[a]) fix(i * b, get(i) + "*" + get(b));
  ans = get(n);
  for (int i = 1; 2 * i + 1 < ans.size(); i++) {
    for (int j = 1; j < p[i]; j++) {
      if (j >= n) break;
      fixans(get(n - j) + "+" + get(j));
      if (n % j == 0) fixans(get(n / j) + "*" + get(j));
    }
    for (auto j : st[i]) {
      fixans(get(n - j) + "+" + get(j));
      if (n % j == 0) fixans(get(n / j) + "*" + get(j));
    }
  }
  cout << ans << endl;
}
