def 							UpperCamelCase				(    lowerCAmelCase_ = 4_00_00_00   )		->						int:




       '''simple docstring'''






       _A=	[]
       _A,			_A=	0, 1
       while b <= n:
              if b % 2 == 0:
                     even_fibs.append(lowerCAmelCase_   )
              _A,			_A=	b, a + b
       return sum(lowerCAmelCase_   )


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






from dataclasses import dataclass
from typing import Tuple

import numpy as np
import torch





@dataclass
class      lowerCAmelCase						:
     _SCREAMING_SNAKE_CASE     :     torch.Tensor  # [batch_size x 3]
     _SCREAMING_SNAKE_CASE     :     torch.Tensor  # [batch_size x 3]
     _SCREAMING_SNAKE_CASE     :     torch.Tensor  # [batch_size x 3]
     _SCREAMING_SNAKE_CASE     :     torch.Tensor  # [batch_size x 3]
     _SCREAMING_SNAKE_CASE     :     int
     _SCREAMING_SNAKE_CASE     :     int
     _SCREAMING_SNAKE_CASE     :     float
     _SCREAMING_SNAKE_CASE     :     float
     _SCREAMING_SNAKE_CASE     :     Tuple[int]



     def 			a__  (					self       ):
            assert self.x.shape[0] == self.y.shape[0] == self.z.shape[0] == self.origin.shape[0]
            assert self.x.shape[1] == self.y.shape[1] == self.z.shape[1] == self.origin.shape[1] == 3
            assert len(self.x.shape       ) == len(self.y.shape       ) == len(self.z.shape       ) == len(self.origin.shape       ) == 2



     def 			a__  (					self       ):
            return torch.from_numpy(np.array([self.width, self.height]				,      dtype=np.floataa       )       )



     def 			a__  (					self       ):
            return torch.from_numpy(np.array([self.x_fov, self.y_fov]				,      dtype=np.floataa       )       )



     def 			a__  (					self       ):
            _A=	torch.arange(self.height * self.width       )
            _A=	torch.stack(
                [
                    pixel_indices % self.width,
                    torch.div(lowerCAmelCase__				,      self.width				,      rounding_mode='trunc'       ),
                ]				,      axis=1				,      )
            return coords



     @property
     def 			a__  (					self       ):
            _A,			*_A=	self.shape
            _A=	int(np.prod(lowerCAmelCase__       )       )

            _A=	self.get_image_coords()
            _A=	torch.broadcast_to(coords.unsqueeze(0       )				,      [batch_size * inner_batch_size, *coords.shape]       )
            _A=	self.get_camera_rays(lowerCAmelCase__       )

            _A=	rays.view(lowerCAmelCase__				,      inner_batch_size * self.height * self.width				,      2				,      3       )

            return rays



     def 			a__  (					self				,      lowerCAmelCase__       ):
            _A,			*_A,			_A=	coords.shape
            assert n_coords == 2
            assert batch_size == self.origin.shape[0]

            _A=	coords.view(lowerCAmelCase__				,      -1				,      2       )

            _A=	self.resolution()
            _A=	self.fov()

            _A=	(flat.float() / (res - 1)) * 2 - 1
            _A=	fracs * torch.tan(fov / 2       )

            _A=	fracs.view(lowerCAmelCase__				,      -1				,      2       )
            _A=	(
                self.z.view(lowerCAmelCase__				,      1				,      3       )
                + self.x.view(lowerCAmelCase__				,      1				,      3       ) * fracs[:, :, :1]
                + self.y.view(lowerCAmelCase__				,      1				,      3       ) * fracs[:, :, 1:]
            )
            _A=	directions / directions.norm(dim=-1				,      keepdim=lowerCAmelCase__       )
            _A=	torch.stack(
                [
                    torch.broadcast_to(self.origin.view(lowerCAmelCase__				,      1				,      3       )				,      [batch_size, directions.shape[1], 3]       ),
                    directions,
                ]				,      dim=2				,      )
            return rays.view(lowerCAmelCase__				,      *lowerCAmelCase__				,      2				,      3       )





     def 			a__  (					self				,      lowerCAmelCase__				,      lowerCAmelCase__       ):
            assert width * self.height == height * self.width, "The aspect ratio should not change."
            return DifferentiableProjectiveCamera(
                origin=self.origin				,      x=self.x				,      y=self.y				,      z=self.z				,      width=lowerCAmelCase__				,      height=lowerCAmelCase__				,      x_fov=self.x_fov				,      y_fov=self.y_fov				,      )


def 							UpperCamelCase				(    lowerCAmelCase_   )		->						DifferentiableProjectiveCamera:




       '''simple docstring'''






       _A=	[]
       _A=	[]
       _A=	[]
       _A=	[]
       for theta in np.linspace(0       ,					2 * np.pi       ,					num=20   ):
              _A=	np.array([np.sin(lowerCAmelCase_   ), np.cos(lowerCAmelCase_   ), -0.5]   )
              z /= np.sqrt(np.sum(z**2   )   )
              _A=	-z * 4
              _A=	np.array([np.cos(lowerCAmelCase_   ), -np.sin(lowerCAmelCase_   ), 0.0]   )
              _A=	np.cross(lowerCAmelCase_       ,					lowerCAmelCase_   )
              origins.append(lowerCAmelCase_   )
              xs.append(lowerCAmelCase_   )
              ys.append(lowerCAmelCase_   )
              zs.append(lowerCAmelCase_   )
       return DifferentiableProjectiveCamera(
           origin=torch.from_numpy(np.stack(lowerCAmelCase_       ,					axis=0   )   ).float()       ,					x=torch.from_numpy(np.stack(lowerCAmelCase_       ,					axis=0   )   ).float()       ,					y=torch.from_numpy(np.stack(lowerCAmelCase_       ,					axis=0   )   ).float()       ,					z=torch.from_numpy(np.stack(lowerCAmelCase_       ,					axis=0   )   ).float()       ,					width=lowerCAmelCase_       ,					height=lowerCAmelCase_       ,					x_fov=0.7       ,					y_fov=0.7       ,					shape=(1, len(lowerCAmelCase_   ))       ,					)