// yukicoder No.671 #include using namespace std; int main() { string s; cin >> s; string r = "1000000007"; int tmp_ans = r.size() - s.size(); if(tmp_ans < 0) cout << -1 * tmp_ans << "\n"; else cout <