




'''simple docstring'''






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE = 1000		)						->      int:
      snake_case__					:      List[str]  			=						0
      snake_case__					:      int  			=						(n - 1) // 3
      total += ((terms) * (6 + (terms - 1) * 3)) // 2  # total of an A.P.
      snake_case__					:      Optional[Any]  			=						(n - 1) // 5
      total += ((terms) * (10 + (terms - 1) * 5)) // 2
      snake_case__					:      Tuple  			=						(n - 1) // 15
      total -= ((terms) * (30 + (terms - 1) * 15)) // 2
      return total


if __name__ == "__main__":
      print(F'{solution() = }')






'''simple docstring'''






import bsa
import requests






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE		)						->      dict[str, str]:
      return {
          "name": soup.ha.a.text,
          "genre": soup.find('span'							,			class_='genre'		).text.strip(),
          "rating": soup.strong.text,
          "page_link": f"https://www.imdb.com{soup.a.get('href'		)}",
      }






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE = 5		)						->      tuple:
      snake_case__					:      Tuple  			=						int(float(__SCREAMING_SNAKE_CASE		)		)
      if num_movies < 1:
            return ()
      snake_case__					:      Any  			=						(
          'https://www.imdb.com/search/title?title_type='
          f"feature&sort=num_votes,desc&count={num_movies}"
      )
      snake_case__					:      Union[str, Any]  			=						bsa.BeautifulSoup(requests.get(__SCREAMING_SNAKE_CASE		).content							,			'html.parser'		)
      return tuple(
          get_movie_data_from_soup(__SCREAMING_SNAKE_CASE		)
          for movie in source.find_all('div'							,			class_='lister-item mode-advanced'		)		)


if __name__ == "__main__":
      import json

      A_ 			=		int(input("How many movies would you like to see? "))
      print(
          ", ".join(
              json.dumps(movie, indent=4) for movie in get_imdb_top_movies(num_movies)
          )
      )
