#include <bits/stdc++.h>
using namespace std;
int main() {
  int fishFood, rabbitStew, chickenStakes;
  int numberOfDays = 0;
  cin >> fishFood >> rabbitStew >> chickenStakes;
  int maxWeeksFish = fishFood / 3;
  int maxWeeksRabbit = rabbitStew / 2;
  int maxWeeksChicken = chickenStakes / 2;
  int minWeek = min(maxWeeksFish, min(maxWeeksRabbit, maxWeeksChicken));
  numberOfDays += minWeek * 7;
  fishFood -= minWeek * 3;
  rabbitStew -= minWeek * 2;
  chickenStakes -= minWeek * 2;
  int extraDays = 0;
  for (int i = 0; i < 7; i++) {
    int currentDay = i;
    int fft = fishFood;
    int rst = rabbitStew;
    int cst = chickenStakes;
    int tempDays = 0;
    for (int j = 0; j < 7; j++) {
      if (currentDay == 0 || currentDay == 3) {
        if (rst == 0) break;
        rst--;
      } else if (currentDay == 1 || currentDay == 2 || currentDay == 5) {
        if (fft == 0) break;
        fft--;
      } else if (currentDay == 4 || currentDay == 6) {
        if (cst == 0) break;
        cst--;
      }
      tempDays++;
      currentDay = (currentDay + 1) % 7;
    }
    if (tempDays > extraDays) extraDays = tempDays;
  }
  cout << numberOfDays + extraDays;
  return 0;
}
