#include using namespace std; int main() { int x,y,z,c=0; cin>>x>>y>>z; for(int i=1;i<=z;i++)if(i!=x&&i!=y)c++; cout<