#include <bits/stdc++.h>
using namespace std;
long long n, p[10];
map<long long, string> m;
set<long long> s[10];
template <class T>
string toString(T x) {
  ostringstream os;
  os << x;
  return os.str();
}
int getlen(long long x) {
  int ans = 0;
  while (x) {
    ans++;
    x /= 10;
  }
  return max(ans, 1);
}
string get(long long x) {
  if (m.count(x)) return m[x];
  return toString(x);
}
void relaxPower(long long x, string str) {
  if (x > n || str.length() >= getlen(x)) return;
  if (m.count(x) && m[x].length() <= str.length()) return;
  s[m[x].length()].erase(x);
  m[x] = str;
  s[str.length()].insert(x);
}
void getPowers() {
  for (long long x = 2; x * x <= n; x++) {
    long long rs = x * x;
    int p = 2;
    while (rs <= n) {
      string tmp = toString(x) + '^' + toString(p);
      relaxPower(rs, tmp);
      rs *= x;
      p++;
    }
  }
}
void getPowerAndPower(int len) {
  for (int i = 1; i <= len; i++)
    for (int j = i; i + j + 1 <= len; j++)
      for (auto x : s[i])
        for (auto y : s[j]) relaxPower(x * y, get(x) + '*' + get(y));
}
void getSimpleAndPower(int len) {
  for (int i = 1; i + 2 <= len; i++) {
    for (long long x = 1; x < p[len - i - 1]; x++)
      for (long long y : s[i]) relaxPower(x * y, toString(x) + '*' + get(y));
  }
}
void precalc() {
  getPowers();
  getPowerAndPower(7);
  getSimpleAndPower(7);
}
string ans;
void relaxAnswer(string str) {
  if (str.length() < ans.length()) ans = str;
}
void checkAnswer() {
  for (int i = 1; i * 2 + 1 < ans.length(); i++) {
    for (long long x = 1; x <= p[i]; x++) {
      relaxAnswer(get(n - x) + '+' + get(x));
      if (n % x == 0) relaxAnswer(get(n / x) + '*' + get(x));
    }
    for (auto x : s[i]) {
      relaxAnswer(get(n - x) + '+' + get(x));
      if (n % x == 0) relaxAnswer(get(n / x) + '*' + get(x));
    }
  }
}
int main() {
  p[0] = 1;
  for (int i = 1; i < 10; i++) p[i] = p[i - 1] * 10;
  cin >> n;
  precalc();
  ans = get(n);
  checkAnswer();
  cout << ans << endl;
}
