output_description: Print the maximum number of tasty cookies that Takahashi can eat.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A B C
attempt: line = input().split()
  list =[]
  for i in line:
      list.append(int(i))
  min1 = min(list[1:3])
  count = 0
  list[1]-=min1
  list[2]-=min1
  count += min1*2
  c = list[1]
  list.remove(list[1])
  min2 = min(list)
  list[0]-=min2
  list[1]-=min2
  count += min2
  count += c
  if list[0] == 0 && list[1] > 0:
      count += 1
  print(count)
  
problem_description: Statement
  
  Takahashi has A untasty cookies containing antidotes, B tasty cookies
  containing antidotes and C tasty cookies containing poison.
  
  Eating a cookie containing poison results in a stomachache, and eating a
  cookie containing poison while having a stomachache results in a death. As he
  wants to live, he cannot eat one in such a situation. Eating a cookie
  containing antidotes while having a stomachache cures it, and there is no
  other way to cure stomachaches.
  
  Find the maximum number of tasty cookies that Takahashi can eat.
samples: [{"input": "3 1 4", "output": "5\n    \n\nWe can eat all tasty cookies, in the following order:\n\n  * A tasty cookie containing poison\n  * An untasty cookie containing antidotes\n  * A tasty cookie containing poison\n  * A tasty cookie containing antidotes\n  * A tasty cookie containing poison\n  * An untasty cookie containing antidotes\n  * A tasty cookie containing poison\n\n* * *"}, {"input": "5 2 9", "output": "10\n    \n\n* * *"}, {"input": "8 8 1", "output": "9"}]