using System;
class Solution {
private int traduction(string S){
int c=0;
int c2=1;
for(int i=S.Length-1; i>=0;i=i-1){
if (S[i]=='1'){
c=c2+c;
}
c2=c2*2;
return c;
public int solution(string S) {
int n= traduction(S);
while(n!=1){ //Or another condition I don'T remember
if ((n/2)*2==n){
n=n/2;
else{
n=n*3+1; //Or another operation I don't remember
c=c+1;
public class Program
{
public static void Main()