#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, ans = 0;
  cin >> a >> b >> c;
  long long minn = min(a / 3, min(b / 2, c / 2));
  ans += minn * 7;
  a -= minn * 3;
  b -= minn * 2;
  c -= minn * 2;
  int d[7] = {0};
  for (int i = 0; i < 7; i++) {
    long long x = a, y = b, z = c, dem = 0;
    int j = i;
    while (x != -1 && y != -1 && z != -1 && d[i] < 8) {
      if (j == 0 || j == 3 || j == 6 || j == 7 || j == 10 || j == 13) {
        x--;
        d[i]++;
        j++;
      } else if (j == 1 || j == 5 || j == 8 || j == 12) {
        y--;
        d[i]++;
        j++;
      } else if (j == 2 || j == 4 || j == 9 || j == 11) {
        z--;
        d[i]++;
        j++;
        dem++;
      }
    }
  }
  sort(d, d + 7);
  cout << ans + d[6] - 1;
  return 0;
}
