I am really struggling to calculate the big O notation of this piece of code.
Boolean validInput = false;
while (validInput == false) {
    System.out.println("Please input number of cards");
    if (stdin.hasNextInt()) {
        n = stdin.nextInt();
        if (n > 0) {
            validInput = true;
        } else {
            System.out.println("INVALID INPUT: INPUT MUST BE STRICTLY POSITIVE INTEGER");
        }
    } else {
        System.out.println("INVALID INPUT: INPUT MUST BE STRICTLY POSITIVE INTEGER");
        stdin.next();
    }
}
 
     
    