





import unittest

from transformers import SqueezeBertConfig, is_torch_available
from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
							import torch

							from transformers import (
							    SQUEEZEBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
							    SqueezeBertForMaskedLM,
							    SqueezeBertForMultipleChoice,
							    SqueezeBertForQuestionAnswering,
							    SqueezeBertForSequenceClassification,
							    SqueezeBertForTokenClassification,
							    SqueezeBertModel,
							)
class     UpperCamelCase__					(     lowerCamelCase__				):






		'''simple docstring'''






		def __init__(							self,   snake_case__,   snake_case__=13,   snake_case__=7,   snake_case__=True,   snake_case__=True,   snake_case__=False,   snake_case__=True,   snake_case__=99,   snake_case__=32,   snake_case__=5,   snake_case__=4,   snake_case__=64,   snake_case__="gelu",   snake_case__=0.1,   snake_case__=0.1,   snake_case__=5_12,   snake_case__=16,   snake_case__=2,   snake_case__=0.02,   snake_case__=3,   snake_case__=4,   snake_case__=None,   snake_case__=2,   snake_case__=2,   snake_case__=2,   snake_case__=2,   snake_case__=4,   snake_case__=1,   )       -> List[Any]:






									"""simple docstring"""
									lowercase_	:   Any  				=     parent
									lowercase_	:   Optional[int]  				=     batch_size
									lowercase_	:   Any  				=     seq_length
									lowercase_	:   Tuple  				=     is_training
									lowercase_	:   Optional[Any]  				=     use_input_mask
									lowercase_	:   List[str]  				=     use_token_type_ids
									lowercase_	:   Optional[Any]  				=     use_labels
									lowercase_	:   List[str]  				=     vocab_size
									lowercase_	:   Tuple  				=     hidden_size
									lowercase_	:   List[str]  				=     num_hidden_layers
									lowercase_	:   Optional[Any]  				=     num_attention_heads
									lowercase_	:   Union[str, Any]  				=     intermediate_size
									lowercase_	:   int  				=     hidden_act
									lowercase_	:   Optional[Any]  				=     hidden_dropout_prob
									lowercase_	:   Optional[Any]  				=     attention_probs_dropout_prob
									lowercase_	:   str  				=     max_position_embeddings
									lowercase_	:   Optional[int]  				=     type_vocab_size
									lowercase_	:   List[str]  				=     type_sequence_label_size
									lowercase_	:   Dict  				=     initializer_range
									lowercase_	:   List[Any]  				=     num_labels
									lowercase_	:   Optional[Any]  				=     num_choices
									lowercase_	:   List[str]  				=     scope
									lowercase_	:   List[str]  				=     q_groups
									lowercase_	:   Dict  				=     k_groups
									lowercase_	:   List[str]  				=     v_groups
									lowercase_	:   List[Any]  				=     post_attention_groups
									lowercase_	:   Tuple  				=     intermediate_groups
									lowercase_	:   List[Any]  				=     output_groups






		def 						snake_case__				(							self  )       -> Union[str, Any]:






									"""simple docstring"""
									lowercase_	:   List[str]  				=     ids_tensor([self.batch_size, self.seq_length],   self.vocab_size  )

									lowercase_	:   str  				=     None
									if self.use_input_mask:
																lowercase_	:   Tuple  				=     random_attention_mask([self.batch_size, self.seq_length]  )

									lowercase_	:   str  				=     None
									lowercase_	:   str  				=     None
									lowercase_	:   List[Any]  				=     None
									if self.use_labels:
																lowercase_	:   str  				=     ids_tensor([self.batch_size],   self.type_sequence_label_size  )
																lowercase_	:   List[Any]  				=     ids_tensor([self.batch_size, self.seq_length],   self.num_labels  )
																lowercase_	:   List[str]  				=     ids_tensor([self.batch_size],   self.num_choices  )

									lowercase_	:   str  				=     self.get_config()

									return config, input_ids, input_mask, sequence_labels, token_labels, choice_labels






		def 						snake_case__				(							self  )       -> str:






									"""simple docstring"""
									return SqueezeBertConfig(
									    embedding_size=self.hidden_size,   vocab_size=self.vocab_size,   hidden_size=self.hidden_size,   num_hidden_layers=self.num_hidden_layers,   num_attention_heads=self.num_attention_heads,   intermediate_size=self.intermediate_size,   hidden_act=self.hidden_act,   attention_probs_dropout_prob=self.hidden_dropout_prob,   attention_dropout=self.attention_probs_dropout_prob,   max_position_embeddings=self.max_position_embeddings,   initializer_range=self.initializer_range,   q_groups=self.q_groups,   k_groups=self.k_groups,   v_groups=self.v_groups,   post_attention_groups=self.post_attention_groups,   intermediate_groups=self.intermediate_groups,   output_groups=self.output_groups,   )






		def 						snake_case__				(							self,   snake_case__,   snake_case__,   snake_case__,   snake_case__,   snake_case__,   snake_case__  )       -> Tuple:






									"""simple docstring"""
									lowercase_	:   Optional[Any]  				=     SqueezeBertModel(config=snake_case__  )
									model.to(snake_case__  )
									model.eval()
									lowercase_	:   List[str]  				=     model(snake_case__,   snake_case__  )
									lowercase_	:   Tuple  				=     model(snake_case__  )
									self.parent.assertEqual(result.last_hidden_state.shape,   (self.batch_size, self.seq_length, self.hidden_size)  )






		def 						snake_case__				(							self,   snake_case__,   snake_case__,   snake_case__,   snake_case__,   snake_case__,   snake_case__  )       -> int:






									"""simple docstring"""
									lowercase_	:   Union[str, Any]  				=     SqueezeBertForMaskedLM(config=snake_case__  )
									model.to(snake_case__  )
									model.eval()
									lowercase_	:   Tuple  				=     model(snake_case__,   attention_mask=snake_case__,   labels=snake_case__  )
									self.parent.assertEqual(result.logits.shape,   (self.batch_size, self.seq_length, self.vocab_size)  )






		def 						snake_case__				(							self,   snake_case__,   snake_case__,   snake_case__,   snake_case__,   snake_case__,   snake_case__  )       -> List[Any]:






									"""simple docstring"""
									lowercase_	:   List[Any]  				=     SqueezeBertForQuestionAnswering(config=snake_case__  )
									model.to(snake_case__  )
									model.eval()
									lowercase_	:   Optional[Any]  				=     model(
									    snake_case__,   attention_mask=snake_case__,   start_positions=snake_case__,   end_positions=snake_case__  )
									self.parent.assertEqual(result.start_logits.shape,   (self.batch_size, self.seq_length)  )
									self.parent.assertEqual(result.end_logits.shape,   (self.batch_size, self.seq_length)  )






		def 						snake_case__				(							self,   snake_case__,   snake_case__,   snake_case__,   snake_case__,   snake_case__,   snake_case__  )       -> Optional[int]:






									"""simple docstring"""
									lowercase_	:   Dict  				=     self.num_labels
									lowercase_	:   List[str]  				=     SqueezeBertForSequenceClassification(snake_case__  )
									model.to(snake_case__  )
									model.eval()
									lowercase_	:   str  				=     model(snake_case__,   attention_mask=snake_case__,   labels=snake_case__  )
									self.parent.assertEqual(result.logits.shape,   (self.batch_size, self.num_labels)  )






		def 						snake_case__				(							self,   snake_case__,   snake_case__,   snake_case__,   snake_case__,   snake_case__,   snake_case__  )       -> List[str]:






									"""simple docstring"""
									lowercase_	:   Any  				=     self.num_labels
									lowercase_	:   List[str]  				=     SqueezeBertForTokenClassification(config=snake_case__  )
									model.to(snake_case__  )
									model.eval()

									lowercase_	:   str  				=     model(snake_case__,   attention_mask=snake_case__,   labels=snake_case__  )
									self.parent.assertEqual(result.logits.shape,   (self.batch_size, self.seq_length, self.num_labels)  )






		def 						snake_case__				(							self,   snake_case__,   snake_case__,   snake_case__,   snake_case__,   snake_case__,   snake_case__  )       -> Dict:






									"""simple docstring"""
									lowercase_	:   List[Any]  				=     self.num_choices
									lowercase_	:   str  				=     SqueezeBertForMultipleChoice(config=snake_case__  )
									model.to(snake_case__  )
									model.eval()
									lowercase_	:   List[str]  				=     input_ids.unsqueeze(1  ).expand(-1,   self.num_choices,   -1  ).contiguous()
									lowercase_	:   Union[str, Any]  				=     input_mask.unsqueeze(1  ).expand(-1,   self.num_choices,   -1  ).contiguous()
									lowercase_	:   Optional[int]  				=     model(
									    snake_case__,   attention_mask=snake_case__,   labels=snake_case__,   )
									self.parent.assertEqual(result.logits.shape,   (self.batch_size, self.num_choices)  )






		def 						snake_case__				(							self  )       -> str:






									"""simple docstring"""
									lowercase_	:   Union[str, Any]  				=     self.prepare_config_and_inputs()
									((lowercase_)				,		(lowercase_)				,		(lowercase_)				,		(lowercase_)				,		(lowercase_)				,		(lowercase_))	:   Tuple  				=     config_and_inputs
									lowercase_	:   int  				=     {"""input_ids""": input_ids, """attention_mask""": input_mask}
									return config, inputs_dict




@require_torch
class     UpperCamelCase__					(     lowerCamelCase__				, lowerCamelCase__				, unittest.TestCase				):






		'''simple docstring'''






		__a       :       List[str]       =	(
		    (
		        SqueezeBertModel,
		        SqueezeBertForMaskedLM,
		        SqueezeBertForMultipleChoice,
		        SqueezeBertForQuestionAnswering,
		        SqueezeBertForSequenceClassification,
		        SqueezeBertForTokenClassification,
		    )
		    if is_torch_available()
		    else None
		)
		__a       :       Union[str, Any]       =	(
		    {
		        """feature-extraction""": SqueezeBertModel,
		        """fill-mask""": SqueezeBertForMaskedLM,
		        """question-answering""": SqueezeBertForQuestionAnswering,
		        """text-classification""": SqueezeBertForSequenceClassification,
		        """token-classification""": SqueezeBertForTokenClassification,
		        """zero-shot""": SqueezeBertForSequenceClassification,
		    }
		    if is_torch_available()
		    else {}
		)
		__a       :       Union[str, Any]       =	False
		__a       :       Optional[int]       =	True
		__a       :       int       =	False






		def 						snake_case__				(							self  )       -> List[Any]:






									"""simple docstring"""
									lowercase_	:   int  				=     SqueezeBertModelTester(self  )
									lowercase_	:   List[Any]  				=     ConfigTester(self,   config_class=snake_case__,   dim=37  )






		def 						snake_case__				(							self  )       -> Tuple:






									"""simple docstring"""
									self.config_tester.run_common_tests()






		def 						snake_case__				(							self  )       -> int:






									"""simple docstring"""
									lowercase_	:   Any  				=     self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_squeezebert_model(*snake_case__  )






		def 						snake_case__				(							self  )       -> Optional[int]:






									"""simple docstring"""
									lowercase_	:   Any  				=     self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_squeezebert_for_masked_lm(*snake_case__  )






		def 						snake_case__				(							self  )       -> Dict:






									"""simple docstring"""
									lowercase_	:   List[Any]  				=     self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_squeezebert_for_question_answering(*snake_case__  )






		def 						snake_case__				(							self  )       -> Optional[Any]:






									"""simple docstring"""
									lowercase_	:   Optional[int]  				=     self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_squeezebert_for_sequence_classification(*snake_case__  )






		def 						snake_case__				(							self  )       -> Optional[int]:






									"""simple docstring"""
									lowercase_	:   List[str]  				=     self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_squeezebert_for_token_classification(*snake_case__  )






		def 						snake_case__				(							self  )       -> Dict:






									"""simple docstring"""
									lowercase_	:   Optional[int]  				=     self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_squeezebert_for_multiple_choice(*snake_case__  )






		@slow
		def 						snake_case__				(							self  )       -> str:






									"""simple docstring"""
									for model_name in SQUEEZEBERT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
																lowercase_	:   Optional[int]  				=     SqueezeBertModel.from_pretrained(snake_case__  )
																self.assertIsNotNone(snake_case__  )




@require_sentencepiece
@require_tokenizers
@require_torch
class     UpperCamelCase__					(     unittest.TestCase				):






		'''simple docstring'''






		@slow
		def 						snake_case__				(							self  )       -> int:






									"""simple docstring"""
									lowercase_	:   List[str]  				=     SqueezeBertForSequenceClassification.from_pretrained("""squeezebert/squeezebert-mnli"""  )

									lowercase_	:   Union[str, Any]  				=     torch.tensor([[1, 2_94_14, 2_32, 3_28, 7_40, 11_40, 1_26_95, 69, 13, 15_88, 2]]  )
									lowercase_	:   Dict  				=     model(snake_case__  )[0]
									lowercase_	:   Dict  				=     torch.Size((1, 3)  )
									self.assertEqual(output.shape,   snake_case__  )
									lowercase_	:   Any  				=     torch.tensor([[0.6401, -0.0349, -0.6041]]  )
									self.assertTrue(torch.allclose(snake_case__,   snake_case__,   atol=1E-4  )  )






def  __magic_name__  (				lowercase = 1000				)				-> int:

							"""simple docstring"""



							lowercase_				,		lowercase_	:   Optional[Any]  				=     1, 1
							lowercase_	:   Tuple  				=     2
							while True:
														lowercase_	:   Dict  				=     0
														lowercase_	:   List[Any]  				=     fa + fa
														lowercase_				,		lowercase_	:   List[str]  				=     fa, f
														index += 1
														for _ in str(lowercase				):
																					i += 1
														if i == n:
																					break
							return index


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