125 + {14 * [40 + (x + 240) : 40] - 34} * 17 = 47147
{14 * [40 + (x + 240) : 40] - 34} * 17 = 47147 - 125
14 * [40 + (x + 240) : 40] - 34 = 47022 : 17
14 * 40 + (x + 240) : 40 = 2766 - 34
14 * 40 + (x + 240) = 2732 * 40
560 + x + 240 = 109280
x = 109280 - 240 - 560
x = 108480