For this Question: Given an integer N such that no digit of N is 0, find minimum numbers of digits that need to be removed from N such that N becomes divisible by 3. Note: if all the digits of N needs to removed report -1.Input contains a single integer N.

Constraints:
1 <= N <= 10^18
No digit of N is 0.Print the minimum number of digits that needs to removed to make N divisible by 3. Note: if all the digits of N needs to removed report -1.Sample Input 1
35

Sample Output 1
1

Explanation: we remove 5 from 35 making it 3.

Sample Input 2
44

Sample Output 2
-1

Explanation: As we have to remove all digits we report -1., I have written this Solution Code: #pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define VV vector
#define pb push_back
#define bitc  __builtin_popcountll
#define m_p make_pair
#define infi 1e18+1
#define eps 0.000000000001
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);
string char_to_str(char c){string tem(1,c);return tem;}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template<class T>//usage rand<long long>()
T rand() {
    return uniform_int_distribution<T>()(rng);
}
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

template<class T>
using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// string to integer stoi()
// string to long long stoll()
// string.substr(position,length);
// integer to string to_string();
 
//////////////
auto clk=clock();
#define all(x) x.begin(),x.end()
#define S second
#define F first
#define sz(x) ((long long)x.size())
#define int long long  
#define f80 __float128
#define pii pair<int,int>
/////////////

int n;
int num[20];
int cnt = 0;
int sum = 0;
int amount[3];
signed main()
{
	fastio;
	#ifdef ANIKET_GOYAL
		freopen("inputf.in","r",stdin);
		freopen("outputf.in","w",stdout);
	#endif
	cin >> n;
	while(n)
	{
		num[++cnt] = n % 10;
		n /= 10;
	}
	for(int i = 1; i <= cnt; i++)
	{
		sum += num[i];
	}
	for(int i = 1; i <= cnt; i++)
	{
		amount[num[i] % 3]++;
	}
	if(sum % 3 == 0)
	{
		printf("0\n");
	}
	else if(sum % 3 == 1)
	{
		if(amount[1] && cnt > 1)
		{
			printf("1\n");
		}
		else if(amount[2] >= 2 && cnt > 2)
		{
			printf("2\n");
		}
		else
		{
			printf("-1\n");
		}
	}
	else if(sum % 3 == 2)
	{
		if(amount[2] && cnt > 1)
		{
			printf("1\n");
		}
		else if(amount[1] >= 2 && cnt > 2)
		{
			printf("2\n");
		}
		else
		{
			printf("-1\n");
		}
	}
	return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?