#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

#define all(x) (x).begin(), (x).end()
#define dbl(k, x) fixed << setprecision(k) << (x)

template <typename _T>
inline void _DBG(const char *s, _T x) {
  cerr << s << " = " << x << "\n";
}
template <typename _T, typename... args>
void _DBG(const char *s, _T x, args... a) {
  while (*s != ',') cerr << *s++;
  cerr << " = " << x << ',';
  _DBG(s + 1, a...);
}

#define _upgrade                \
  ios_base::sync_with_stdio(0); \
  cin.tie(0);                   \
  cout.tie(0);
#define DBG(...) _DBG(#__VA_ARGS__, __VA_ARGS__)

// ********************** CODE ********************** //

long long go(long long sum, long long del, long long n) {
  if (n == 0) {
    if (sum != 0 && sum % 3 == 0) {
      return del;
    } else {
      return 1e18;
    }
  }

  int last = n % 10;
  n /= 10;

  return min(go(sum + last, del, n), go(sum, del + 1, n));
}

int main() {
  _upgrade;
  long long n;
  cin >> n;
  long long res = go(0LL, 0LL, n);
  cout << (res == 1e18 ? -1 : res) << '\n';
  return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define int long long int
#define pii pair<int,int>
const int INF= 1e12;
const int MAX=5e6+5;
const int MAXK=105;
const int mod = 1e9+7;
int gcd(int a, int b)
{
    while(b!=0)
    {
        a=a%b;
        swap(a,b);
    }
    return a;
}
int binpow(int a,int b)
{
    int res=1;
    while(b>0)
    {
        if(b%2==1)
            res=res*a%mod;
        a=a*a%mod;
        b/=2;
    }
    return res;
}
/*
 * check modulus when using binpow
 */
void solve()
{
    double val = 1.08;
    int n;
    cin>>n;
    val=floor(val*n);
    //cout<<val<<"\n";
    if(val<206)
    {
        cout<<"Yay!";
    }
    else if(val==206)
    {
        cout<<"so-so";
    }
    else
    {
        cout<<":(";
    }

}
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
#ifndef ONLINE_JUDGE
   freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#endif // ONLINE_JUDGE
    int t=1;
    //cin>>t;
    for(int i=1;i<=t;i++)
    {
        //cout<<"Case #"<<i<<": ";
        solve();
    }
}