

'''simple docstring'''

def    A_  ( snake_case = 1000 ):
  SCREAMING_SNAKE_CASE:List[str]						      =					3
  SCREAMING_SNAKE_CASE:Tuple						      =					0
  while a < n:
    if a % 3 == 0 or a % 5 == 0:
      result += a
    elif a % 15 == 0:
      result -= a
    a += 1
  return result


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









'''simple docstring'''

import PIL.Image
import PIL.ImageOps
from packaging import version
from PIL import Image


if version.parse(version.parse(PIL.__version__).base_version) >= version.parse("9.1.0"):
    A_       						=							{
        "linear": PIL.Image.Resampling.BILINEAR,
        "bilinear": PIL.Image.Resampling.BILINEAR,
        "bicubic": PIL.Image.Resampling.BICUBIC,
        "lanczos": PIL.Image.Resampling.LANCZOS,
        "nearest": PIL.Image.Resampling.NEAREST,
    }
else:
    A_       						=							{
        "linear": PIL.Image.LINEAR,
        "bilinear": PIL.Image.BILINEAR,
        "bicubic": PIL.Image.BICUBIC,
        "lanczos": PIL.Image.LANCZOS,
        "nearest": PIL.Image.NEAREST,
    }





def    A_  ( snake_case ):
  SCREAMING_SNAKE_CASE:Any						      =					(images / 2 + 0.5).clamp(0      ,       1 )
  SCREAMING_SNAKE_CASE:Optional[Any]						      =					images.cpu().permute(0      ,       2      ,       3      ,       1 ).float().numpy()
  SCREAMING_SNAKE_CASE:str						      =					numpy_to_pil(snake_case )
  return images





def    A_  ( snake_case ):
  if images.ndim == 3:
    SCREAMING_SNAKE_CASE:List[str]						      =					images[None, ...]
  SCREAMING_SNAKE_CASE:List[Any]						      =					(images * 255).round().astype("uint8" )
  if images.shape[-1] == 1:
    # special case for grayscale (single channel) images
    SCREAMING_SNAKE_CASE:Any						      =					[Image.fromarray(image.squeeze()      ,       mode="L" ) for image in images]
  else:
    SCREAMING_SNAKE_CASE:int						      =					[Image.fromarray(snake_case ) for image in images]

  return pil_images






