#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, c, days, ma, i, a1, b1, c1, mi;
  cin >> a >> b >> c;
  a1 = a / 3;
  b1 = b / 2;
  c1 = c / 2;
  mi = min(a1, min(b1, c1));
  days = mi * 7;
  a = a - (3 * mi);
  b = b - (2 * mi);
  c = c - (2 * mi);
  mi = min(a, min(b, c));
  ma = max(a, max(b, c));
  if (mi == ma) {
    if (mi == 1) days = days + 3;
  } else {
    if ((b == mi) && (c == mi)) {
      if (b == 0) {
        if (a > 1)
          days = days + 2;
        else
          days = days + 1;
      } else {
        if (a >= 3)
          days = days + 5;
        else
          days = days + 4;
      }
    } else if ((a == mi) && (b == mi)) {
      if (a == 0)
        days = days + 1;
      else
        days = days + 4;
    } else if ((a == mi) && (c == mi)) {
      if (a == 0)
        days = days + 1;
      else
        days = days + 3;
    } else if (a == mi) {
      if (a == 0)
        days += 2;
      else if (a == 1)
        days += 5;
      else if (a == 2)
        days += 6;
    } else if (b == mi) {
      if (b == 0) {
        if (a >= c) {
          if (c == 1)
            days += 2;
          else
            days += 3;
        } else
          days += 3;
      } else {
        if (a > 2)
          days += 6;
        else
          days += 5;
      }
    } else if (c == mi) {
      if (c == 0) {
        if (a >= b) {
          if (b == 1) {
            if (a > b)
              days += 3;
            else
              days += 2;
          } else
            days += 4;
        } else {
          if (a == 1)
            days += 2;
          else
            days += 4;
        }
      } else {
        if (a > 2)
          days += 6;
        else
          days += 5;
      }
    }
  }
  cout << days << endl;
}
