



'''simple docstring'''

import csv

import tweepy

# Twitter API credentials
snake_case_			=     """"""
snake_case_			=     """"""
snake_case_			=     """"""
snake_case_			=     """"""






def       __lowercase  (_SCREAMING_SNAKE_CASE      :str       ):
				SCREAMING_SNAKE_CASE  :						str      					= tweepy.OAuthHandler(snake_case__    ,	snake_case__       )
				auth.set_access_token(snake_case__    ,	snake_case__       )
				SCREAMING_SNAKE_CASE  :						Optional[int]      					= tweepy.API(snake_case__       )

				# initialize a list to hold all the tweepy Tweets
				SCREAMING_SNAKE_CASE  :						Union[str, Any]      					= []

				# make initial request for most recent tweets (200 is the maximum allowed count)
				SCREAMING_SNAKE_CASE  :						List[str]      					= api.user_timeline(screen_name=snake_case__    ,	count=2_00       )

				# save most recent tweets
				alltweets.extend(snake_case__       )

				# save the id of the oldest tweet less one
				SCREAMING_SNAKE_CASE  :						Optional[Any]      					= alltweets[-1].id - 1

				# keep grabbing tweets until there are no tweets left to grab
				while len(snake_case__       ) > 0:
								print(F'''getting tweets before {oldest}'''       )

								# all subsequent requests use the max_id param to prevent duplicates
								SCREAMING_SNAKE_CASE  :						List[Any]      					= api.user_timeline(
								    screen_name=snake_case__    ,	count=2_00    ,	max_id=snake_case__       )

								# save most recent tweets
								alltweets.extend(snake_case__       )

								# update the id of the oldest tweet less one
								SCREAMING_SNAKE_CASE  :						Optional[int]      					= alltweets[-1].id - 1

								print(F'''...{len(snake_case__       )} tweets downloaded so far'''       )

				# transform the tweepy tweets into a 2D array that will populate the csv
				SCREAMING_SNAKE_CASE  :						Optional[int]      					= [[tweet.id_str, tweet.created_at, tweet.text] for tweet in alltweets]

				# write the csv
				with open(F'''new_{screen_name}_tweets.csv'''    ,	'''w'''       ) as f:
								SCREAMING_SNAKE_CASE  :						List[str]      					= csv.writer(snake_case__       )
								writer.writerow(['''id''', '''created_at''', '''text''']       )
								writer.writerows(snake_case__       )


if __name__ == "__main__":
	# pass in the username of the account you want to download
	get_all_tweets("""FirePing32""")






'''simple docstring'''

from __future__ import annotations






def       __lowercase  (_SCREAMING_SNAKE_CASE      :int | str       ):
				SCREAMING_SNAKE_CASE  :						int      					= str(_SCREAMING_SNAKE_CASE       )
				return n == n[::-1]






def       __lowercase  (_SCREAMING_SNAKE_CASE      :int = 1_00_00_00       ):
				SCREAMING_SNAKE_CASE  :						int      					= 0

				for i in range(1    ,	_SCREAMING_SNAKE_CASE       ):
								if is_palindrome(_SCREAMING_SNAKE_CASE       ) and is_palindrome(bin(_SCREAMING_SNAKE_CASE       ).split('''b'''       )[1]       ):
												total += i
				return total


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




