#include using namespace std; int main(){ string n; cin>>n; int e=count(n.begin(),n.end(),'3'),ans=(e==n.size()-1?e:-1); cout<