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