function gcd(a, b){
if(a % b === 0) return b
return gcd(b, a % b)
}
let str
while(str = readline()){
// 由 b / a = q ··· r 得 b = aq + r
// a / b = 1 / (q + 1) + (a - r) / b(q - 1)
let [a, b] = str.split('/').map(Number)
let q = 0
const ans = []
while(a > 1){
q = parseInt(b / a)
ans.push('1/' + (q + 1))
a = a * (q + 1) - b
b = b * (q + 1)
let maxGcd = gcd(a, b)
if(maxGcd > 1){
a = a / maxGcd
b = b / maxGcd
}
}
ans.push('1/' + b)
print(ans.join('+'))
}