Getting wrong answer in LRNDSA02

I am getting a wrong answer for this question; https://www.codechef.com/LRNDSA02/problems/COMPILER . I would be very grateful if someone could look at my code and tell me why I would be getting this warning. Thank you.

using namespace::std;

int main(){
    long long int t;
    cin >> t;
    
    while(t--){
        string userDef;
        stack<int>myStack;
        cin >> userDef;
        int count = 0;
        
        if(userDef[0] == '>'){
                break;
            }
        else {
            for(int i=0; i<userDef.length(); i++){
                if(userDef[i] == '<'){
                myStack.push(1);
                count++;
                }
                if(userDef[i] == '>'){
                    if(myStack.empty()){
                    //count++;
                    break;
                    } else {
                    myStack.pop();
                    count++;
                }
            }
        }
    }
    
        cout << count << endl;
    }
        
}