#include int main(void){ long int x,y,z,a; a = 0; scanf("%ld%ld%ld",&x,&y,&z); if (y<=z) {a++;} if (x<=z) {a++;} printf("%ld\n",z-a); return 0; }