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: #include <bits/stdc++.h>
  using namespace std;
  typedef long long ll;
  typedef pair<int,int> pii;
  typedef pair<ll,ll> pll;
  typedef pair<double,int> pdi;
  typedef pair<double,double> pdd;
  typedef pair<double,ll> pdl;
  typedef vector<int> vi;
  typedef vector<ll> vl;
  typedef vector<pii> vii;
  typedef vector<pll> vll;
  typedef vector<vl> vvl;
  typedef vector<vi> vvi;
  typedef vector<bool> vb;
  typedef vector<vb> vvb;
  typedef vector<double> vd;
  typedef vector<vd> vvd;
  typedef vector<pdd> vdd;
  typedef vector<pdi> vdi;
  typedef vector<pdl> vdl;
  typedef vector<string> vs;
  #define fi first
  #define se second
  const ll INFLL=LLONG_MAX;
  const int INF=INT_MAX;
  const ll MAXLL=0x3f3f3f3f3f3f3f3f;
  const int MAX=0x3f3f3f3f;
  const ll MOD=1000000007;
  const ll mod=998244353;
  #define eb emplace_back
  #define emp emplace
  #define mp(a,b) make_pair(a,b)
  template<class T> using min_heap=priority_queue<T,vector<T>,greater<T> >;
  template<class T>
  void sort(vector<T>& v){
  	sort(v.begin(),v.end());
  }
  template <class T, class U>
  void sort(vector<T>& v,U func){
  	sort(v.begin(),v.end(),func);
  }
  template<class T>
  void rsort(vector<T>& v){
  	sort(v.rbegin(),v.rend());
  }
  template <class T>
  int lb_index(vector<T>& v,T k){
  	return lower_bound(v.begin(),v.end(),k)-v.begin();
  }
  template <class T>
  int ub_index(vector<T>& v,T k){
  	return upper_bound(v.begin(),v.end(),k)-v.begin();
  }
  template<class T>
  bool is_sorted(vector<T>& v){
  	return is_sorted(v.begin(),v.end());
  }
  template<class T>
  bool sorted(vector<T>& v){
  	return is_sorted(v);
  }
  void precompute(){
  
  	return;
  }
  void solve(){
  	ll a,b,c;
  	cin>>a>>b>>c;
  	cout<<min(c,a+b+1)+b;
  	return;
  }
  
  int main(){
  	ios::sync_with_stdio(0);
  	int numberofsubtestcases=1;
  //	cin>>numberofsubtestcases;
  	precompute();
  	for(int looping=1;looping<=numberofsubtestcases;looping++){
  //		cout<<"Case #"<<looping<<": ";
  		solve();
  	}
  	return 0;
  }
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"}]