#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 1;
int a, b, c;
long long ans;
int main() {
  cin >> a >> b >> c;
  int xiao = min(a, min(b, c));
  if (xiao < 100) {
    int f = 0;
    for (int s = 1; s <= 7; s++) {
      int kk = 0, f = 0, x = a, y = b, z = c, i = s;
      while (1) {
        while (1) {
          if (i == 1 || i == 4 || i == 7) x--;
          if (x < 0) {
            f = 1;
            break;
          }
          if (i == 2 || i == 6) y--;
          if (y < 0) {
            f = 1;
            break;
          }
          if (i == 3 || i == 5) z--;
          if (z < 0) {
            f = 1;
            break;
          }
          kk++;
          if (i == 7) i = 0;
          i++;
        }
        if (f) break;
      }
      ans = max(ans, (long long)kk);
    }
    cout << ans;
    return 0;
  }
  int yu = a / 3;
  int tu = b / 2;
  int ji = c / 2;
  int minn = min(yu, min(tu, ji));
  minn -= 1;
  a -= minn * 3;
  b -= minn * 2;
  c -= minn * 2;
  ans += (long long)minn * 7;
  long long oo = ans;
  int f = 0;
  for (int s = 1; s <= 7; s++) {
    int f = 0, x = a, y = b, z = c, i = s;
    long long kk = oo;
    while (1) {
      while (1) {
        if (i == 1 || i == 4 || i == 7) x--;
        if (x < 0) {
          f = 1;
          break;
        }
        if (i == 2 || i == 6) y--;
        if (y < 0) {
          f = 1;
          break;
        }
        if (i == 3 || i == 5) z--;
        if (z < 0) {
          f = 1;
          break;
        }
        kk++;
        if (i == 7) i = 0;
        i++;
      }
      if (f) break;
    }
    ans = max(ans, kk);
  }
  cout << ans;
  return 0;
}
