#include <stdio.h>
long long scoredBalls, missedBalls;
long long numOfMatches;
long long max, min;
int main(){
scanf("%lld%lld%lld", &scoredBalls, &missedBalls, &numOfMatches);
long long leftScoredBalls, leftMissedBalls;
if (scoredBalls >= numOfMatches){
//进球数足够多,一共numOfMatches场比赛中有numOfMatches - 1场比赛都是1比0赢了,剩下的唯一的比赛不是赢了就是平了
max = 3 * (numOfMatches - 1);
leftScoredBalls = scoredBalls - numOfMatches + 1;
if (leftScoredBalls > missedBalls){
//剩下的一场比赛也赢了
max += 3;
} else if (leftScoredBalls == missedBalls){
//剩下的一场比赛平了
max += 1;
}
} else {
//进球数不够多,一共numOfMatches场比赛中有scoredBalls场比赛赢了,剩下的比赛不是输了就是平了
max = 3 * scoredBalls;
if (missedBalls > 0){
//剩下的比赛中有一场输了其他平了
max += 1 * (numOfMatches - scoredBalls - 1);
} else {
//剩下的比赛中全平了
max += 1 * (numOfMatches - scoredBalls);
}
}
//类比求最大数的情况
if (missedBalls >= numOfMatches){
leftMissedBalls = missedBalls - numOfMatches + 1;
if (leftMissedBalls < scoredBalls){
min += 3;
} else if (leftMissedBalls == scoredBalls){
min += 1;
}
} else {
if (scoredBalls > 0){
min += 3;
min += 1 * (numOfMatches - missedBalls - 1);
} else {
min += 1 * (numOfMatches - missedBalls); }
}
//坑,进球和失球都在一场比赛,其他比赛都是平局
long long tempMin = 1 * (numOfMatches - 1);
if (scoredBalls > missedBalls){
tempMin += 3;
} else if (scoredBalls == missedBalls){
tempMin += 1;
}
//例如输入是2 2 2的情况,这样算出来的tempMin会比min更小
if (tempMin < min){
min = tempMin;
}
printf("%lld %lld\n", max, min);
return 0;
}