#include<algorithm>
using namespace std;
int a[3];
int main()
{
for(int i = 0; i < 3; i ++)cin >>a[i];
sort(a, a + 3);
int mx = max(a[2] - a[1], a[1] - a[0]);
int mi = min(a[2] - a[1], a[1] - a[0]);
if(mx == 1 && mi == 1 )
{
cout << 0 <<endl << 0;
}
else if(mx == 2)cout << 1 << endl << 1;
else if( mi == 1)
{
cout << 2 <<endl <<max(a[2] - a[1], a[1] - a[0]) - 1;
}
else if(mi == 2)
{
cout << 1 << endl << max(a[2] - a[1], a[1] - a[0]) - 1;
}
else {
cout << 2 <<endl<< max(a[2] - a[1], a[1] - a[0]) - 1;
}
return 0;
}