#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans, i, a, b, c, x, y, z;
  cin >> a >> b >> c;
  x = a / 3;
  y = min(b / 2, c / 2);
  z = min(x, y);
  ans = z * 7;
  a = a - (z * 3);
  b = b - (z * 2);
  c = c - (z * 2);
  int a2 = 0;
  for (i = 1; i <= 7; i++) {
    x = a;
    y = b;
    z = c;
    int j = i, count = 0;
    while (1) {
      if (j == 1 || j == 4 || j == 7) {
        if (x > 0) {
          x--;
          count++;
        } else
          break;
      } else if (j == 2 || j == 6) {
        if (y > 0) {
          y--;
          count++;
        } else
          break;
      } else {
        if (z > 0) {
          z--;
          count++;
        } else
          break;
      }
      if (j < 7)
        j++;
      else
        j = 1;
    }
    a2 = max(a2, count);
  }
  cout << ans + a2;
  return 0;
}
