#include using namespace std; int main(void) { string s; cin >> s; string t = "1000000007"; int ans = s.size() - t.size(); if (ans < 0) ans *= -1; cout << ans << endl; return 0; }