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