package algo; import java.util.Scanner; //import algo.*; public class sample7 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); long X = sc.nextLong(); long Y = sc.nextLong(); long Z = sc.nextLong(); long cnt = 0; for(long i=1; i <= Z; i++) { if(i == X) { } else if (i == Y) { } else { cnt++; } } System.out.println(cnt); } }