#include <iostream>
#include <vector>
using namespace std;
void dfs(int n){
if(n==0||n==2){
cout<<n;
return;
};
vector<int> st;
int t = n;
int i = 0;
while(t){
if(t%2){
st.push_back(i);
}
t/=2;
i++;
}
while(st.size()){
if(st.back()==1){
cout<<2;
}else{
cout<<"2(";
dfs(st.back());
cout<<")";
}
st.pop_back();
if(st.size())cout<<"+";
}
return ;
}
int main() {
int n;
while (cin >> n) {
dfs(n);
}
return 0;
}

京公网安备 11010502036488号