






import unittest

from transformers.testing_utils import require_bsa
from transformers.utils import is_bsa_available

from ...test_feature_extraction_common import FeatureExtractionSavingTestMixin


if is_bsa_available():
				from transformers import MarkupLMFeatureExtractor





class 						SCREAMING_SNAKE_CASE				( unittest.TestCase					):





							"""simple docstring"""

							def __init__(  self:   List[Any]		,     __A:   Any   )    ->				Dict:
												_A								= parent



							def       __A (  self:   Union[str, Any]   )    ->				List[Any]:
												return {}




def      __A					(     ):

					'''simple docstring'''







					_A								= '''<HTML>

    <HEAD>
    <TITLE>sample document</TITLE>
    </HEAD>

    <BODY BGCOLOR="FFFFFF">
    <HR>
    <a href="http://google.com">Goog</a>
    <H1>This is one header</H1>
    <H2>This is a another Header</H2>
    <P>Travel from
        <P>
        <B>SFO to JFK</B>
        <BR>
        <B><I>on May 2, 2015 at 2:00 pm. For details go to confirm.com </I></B>
        <HR>
        <div style="color:#0000FF">
            <h3>Traveler <b> name </b> is
            <p> John Doe </p>
        </div>'''

					_A								= '''
    <!DOCTYPE html>
    <html>
    <body>

    <h1>My First Heading</h1>
    <p>My first paragraph.</p>

    </body>
    </html>
    '''

					return [html_string_a, html_string_a]





@require_bsa
class 						SCREAMING_SNAKE_CASE				( snake_case  ,	unittest.TestCase					):





							"""simple docstring"""

							A_						  =					MarkupLMFeatureExtractor if is_bsa_available() else None

							def       __A (  self:   Optional[int]   )    ->				int:
												_A								= MarkupLMFeatureExtractionTester(self   )

							@property
							def       __A (  self:   Optional[Any]   )    ->				int:
												return self.feature_extract_tester.prepare_feat_extract_dict()



							def       __A (  self:   List[Any]   )    ->				Optional[int]:
												# Initialize feature_extractor
												_A								= self.feature_extraction_class()

												# Test not batched input
												_A								= get_html_strings()[0]
												_A								= feature_extractor(__A   )

												# fmt: off
												_A								= [['''sample document''', '''Goog''', '''This is one header''', '''This is a another Header''', '''Travel from''', '''SFO to JFK''', '''on May 2, 2015 at 2:00 pm. For details go to confirm.com''', '''Traveler''', '''name''', '''is''', '''John Doe''']]
												_A								= [['''/html/head/title''', '''/html/body/a''', '''/html/body/h1''', '''/html/body/h2''', '''/html/body/p''', '''/html/body/p/p/b[1]''', '''/html/body/p/p/b[2]/i''', '''/html/body/p/p/div/h3''', '''/html/body/p/p/div/h3/b''', '''/html/body/p/p/div/h3''', '''/html/body/p/p/div/h3/p''']]
												# fmt: on

												self.assertEqual(encoding.nodes		,     __A   )
												self.assertEqual(encoding.xpaths		,     __A   )

												# Test batched
												_A								= get_html_strings()
												_A								= feature_extractor(__A   )

												# fmt: off
												_A								= expected_nodes + [['''My First Heading''', '''My first paragraph.''']]
												_A								= expected_xpaths + [['''/html/body/h1''', '''/html/body/p''']]

												self.assertEqual(len(encoding.nodes   )		,     2   )
												self.assertEqual(len(encoding.xpaths   )		,     2   )

												self.assertEqual(encoding.nodes		,     __A   )
												self.assertEqual(encoding.xpaths		,     __A   )











def      __A					(     _lowercase = 1_00_00_00 ):

					'''simple docstring'''







					_A								= 1
					_A								= 1
					_A								= {1: 1}

					for inputa in range(2					,			_lowercase ):
										_A								= 0
										_A								= inputa

										while True:
															if number in counters:
																				counter += counters[number]
																				break
															if number % 2 == 0:
																				number //= 2
																				counter += 1
															else:
																				_A								= (3 * number) + 1
																				counter += 1

										if inputa not in counters:
															_A								= counter

										if counter > pre_counter:
															_A								= inputa
															_A								= counter
					return largest_number


if __name__ == "__main__":
				print(solution(int(input().strip())))



