#include <bits/stdc++.h>
using namespace std;
long long n;
string ans;
map<long long, string> je;
int count_num(long long a) {
  int res = 0;
  while (a) {
    res++;
    a /= 10;
  }
  return res;
}
void init() {
  for (long long i = 2; i * i <= n; i++) {
    long long now = i;
    for (int k = 2; now <= n; k++) {
      now *= i;
      string temp = to_string(i) + "^" + to_string(k);
      if (je.find(now) == je.end() || je[now].length() > temp.length()) {
        if (temp.length() < count_num(now)) je[now] = temp;
      }
    }
  }
}
int main() {
  scanf("%lld", &n);
  ans = to_string(n);
  init();
  for (auto i : je) {
    string Mul, Add;
    long long a = n / i.first;
    if (a == 1)
      Mul = "";
    else {
      Mul = (je.find(a) != je.end()) ? je[a] : to_string(a);
      Mul += "*";
    }
    long long c = n % i.first;
    if (c == 0)
      Add = "";
    else {
      Add = "+";
      Add += (je.find(c) != je.end()) ? je[c] : to_string(c);
    }
    string temp = Mul + i.second + Add;
    if (temp.length() < ans.length()) ans = temp;
  }
  cout << ans;
  return 0;
}
