import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
int a=scanner.nextInt();
int b=scanner.nextInt();
int c=scanner.nextInt();
int min,max;
min=Math.min(Math.min(a, b),c);
max=Math.max(Math.max(a, b), c);
boolean flag[]=new boolean[6];
int mm=0;
if (a==min&&b==max) {
mm=c;
}else if (a==min&&c==max) {
mm=b;
}else if (b==min&&c==max) {
mm=a;
}else if (b==min&&a==max) {
mm=c;
}else if (c==min&&a==max) {
mm=b;
}else if (c==min&&b==max) {
mm=a;
}
if ((mm+min)>max) {
System.out.println(mm+min+max);
}else if ((mm+min)<max) {
System.out.println((min+mm)*2-1);
}else if ((mm+min)==max){
System.out.println((min+mm+mm));
}
}
}