/* Solution Author: Alexander Markov Date: 29.04.2018 */ #include #define forn(i, n) for (int i = 0; i < int(n); ++i) #define ford(i, n) for (int i = int(n) - 1; i >= 0; --i) #define sz(c) int((c).size()) #define all(c) (c).begin(), (c).end() #define pb push_back #define mp(x, y) make_pair(x, y) #define fst first #define snd second using namespace std; using vi = vector; using ll = long long; using pii = pair; ll S; int Q; void print_ans(string ans) { Q--; assert(Q >= 0); reverse(all(ans)); cout << "! " << ans << '\n'; cout.flush(); exit(0); } const ll LINF = (ll)1e18; void ask(char c, ll y) { Q--; assert(Q >= 0); assert(0 <= y && y <= LINF); cout << c << ' ' << y << '\n'; cout.flush(); cin >> S; } int main() { cin >> S; Q = 300; string number; while (true) { int cur_digit = 0; for (cur_digit = 0; S != 0; cur_digit++) { assert(cur_digit < 10); ll old_S = S; ask('-', 1); ll diff = old_S - S; if (diff != 1) { break; } } number.pb('0' + cur_digit); if (S == 0) { print_ans(number); return 0; } ask('+', 1); ask('/', 10); } assert(false); return 0; }