def calculate_points(squares, s_tiles, corners): """Calculates the number of points based on the number of squares, s-tiles, and corners. Args: squares: The number of squares. s_tiles: The number of s-tiles. corners: The number of corners. Returns: The number of points. """ # Calculate the points from squares. points_from_squares = squares * 2 # Calculate the points from s-tiles. points_from_s_tiles = 0 if s_tiles > 0 and corners >= 2: points_from_s_tiles = s_tiles * 2 # Calculate the points from corners. points_from_corners = corners // 2 * 3 # Return the total number of points. return points_from_squares + points_from_s_tiles + points_from_corners def main(): """ The main function. """ # Get the number of squares, s-tiles, and corners. squares, s_tiles, corners = map(int, input().split()) # Calculate the number of points. points = calculate_points(squares, s_tiles, corners) # Print the number of points. print(points) if __name__ == "__main__": main()