import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int rest01 = sc.nextInt(); int rest02 = sc.nextInt(); int num = sc.nextInt(); int res = 0; int cnt = 1; while (cnt <= num) { if (cnt != rest01 && cnt != rest02) { res++; } cnt++; } System.out.print(res); } }