#include using namespace std; typedef long long int ll; #define rep(i, n) for (int i = 0; i < (n); i++) int main() { cin.tie(0); ios::sync_with_stdio(false); string s, t = "1000000007"; int ans = 0; cin >> s; for (int i = 0; i < t.size(); i++) { if (s[i] != t[i]) ans++; } cout << ans << endl; return 0; }