#include <bits/stdc++.h>
int x, y, z, t, a, b, c, w, res, s;
int i, j;
using namespace std;
int main() {
  cin >> a >> b >> c;
  for (i = 2; i <= 8; i++) {
    s = 0;
    x = a;
    y = b;
    z = c;
    for (j = i; j <= 8; j++) {
      if (j == 2 || j == 5 || j == 8)
        x--;
      else if (j == 3 || j == 7)
        y--;
      else
        z--;
      if (x < 0 || y < 0 || z < 0) {
        s = j - i;
        break;
      } else
        s = j - i + 1;
    }
    if (x < 0 || y < 0 || z < 0) {
      res = max(res, s);
      continue;
    }
    w = min(x / 3, min(y / 2, z / 2));
    x -= 3 * w;
    y -= 2 * w;
    z -= 2 * w;
    s += w * 7;
    for (j = 2; j <= 8; j++) {
      if (j == 2 || j == 5 || j == 8)
        x--;
      else if (j == 3 || j == 7)
        y--;
      else
        z--;
      if (x < 0 || y < 0 || z < 0) {
        s += j - 2;
        break;
      }
    }
    res = max(res, s);
  }
  cout << res;
}
