output_description: Output the number of points where the wire intersects with the panel
  boundaries.
input_description: The input is given in the following format.
  
      
      
      x y
      
  
  A line of data is given that contains the integer number of panels in the
  horizontal direction x (1 ≤ x ≤ 1000) and those in the vertical direction y (1
  ≤ y ≤ 1000).
attempt: x, y = map(int, input().split())
  if x == y:
      print(x + 1)
  else:
      print(min(x, y) + 1 + abs(x - y) * 2)
  
problem_description: Wire
  
  I am a craftsman specialized in interior works. A customer asked me to perform
  wiring work on a wall whose entire rectangular surface is tightly pasted with
  pieces of panels. The panels are all of the same size (2 m in width, 1 m in
  height) and the wall is filled with an x (horizontal) by y (vertical) array of
  the panels. The customer asked me to stretch a wire from the left top corner
  of the wall to the right bottom corner whereby the wire is tied up at the
  crossing points with the panel boundaries (edges and vertexes) as shown in the
  figure. There are nine tied-up points in the illustrative figure shown below.
  
  ![](https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_PCK2017_wire)  
  Fig: The wire is tied up at the edges and vertexes of the panels (X: 4 panels,
  Y: 6 panels)  
    
  
  Write a program to provide the number of points where the wire intersects with
  the panel boundaries. Assume that the wire and boundary lines have no
  thickness.
samples: [{"input": "4 4", "output": "5"}, {"input": "4 6", "output": "9"}]