#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll n;
map<ll, string> m;
set<ll> s[10];
int len(ll x) {
  if (x == 0) {
    return 1;
  }
  int res = 0;
  while (x) {
    res++;
    x /= 10;
  }
  return res;
}
string get(ll x) {
  if (m.count(x)) {
    return m[x];
  }
  return to_string(x);
}
void relax(ll x, string expr) {
  if (x > n || len(x) <= expr.size()) {
    return;
  }
  if (m.count(x) && m[x].size() <= expr.size()) {
    return;
  }
  s[m[x].size()].erase(x);
  m[x] = expr;
  s[expr.size()].emplace(x);
}
void generatePowers() {
  for (ll a = 2; a * a <= n; ++a) {
    ll x = a * a;
    ll b = 2;
    while (x <= n) {
      relax(x, to_string(a) + "^" + to_string(b));
      x *= a;
      b++;
    }
  }
}
void generatePowerAndPower() {
  for (int i = 1; i <= 4; ++i) {
    for (int j = 1; i + j + 1 <= 7; ++j) {
      for (ll x : s[i]) {
        for (ll y : s[j]) {
          relax(x * y, get(x) + "*" + get(y));
        }
      }
    }
  }
}
void generatePowerMul() {
  for (int i = 1; i <= 5; ++i) {
    const ll pow10 = pow(10, 6 - i);
    for (int j = 1; j < pow10; ++j) {
      for (ll x : s[i]) {
        relax(x * j, to_string(j) + "*" + get(x));
      }
    }
  }
}
void init() {
  generatePowers();
  generatePowerAndPower();
  generatePowerMul();
}
string ans;
void relaxAns(const string& s) {
  if (ans.size() > s.size()) {
    ans = s;
  }
}
void finalRelax() {
  for (int i = 1; 2 * i + 1 < ans.size(); ++i) {
    for (ll x : s[i]) {
      relaxAns(get(n - x) + "+" + get(x));
      if (n % x == 0) {
        relaxAns(get(n / x) + "*" + get(x));
      }
    }
    ll pow10 = pow(10, i);
    for (int j = 1; j < pow10; ++j) {
      relaxAns(get(n - j) + "+" + get(j));
      if (n % j == 0) {
        relaxAns(get(n / j) + "*" + get(j));
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  if (n == 1e10) {
    cout << "10^10\n";
    return 0;
  }
  init();
  ans = get(n);
  finalRelax();
  cout << ans << '\n';
  return 0;
}
