#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  vector<int> b(3);
  for (int i = 0; i < (int)3; i++) cin >> b[i];
  int ind[7] = {0, 1, 2, 0, 2, 1, 0};
  int best = 0;
  for (int i = 0; i < (int)7; i++) {
    vector<int> a(b);
    int w = min(min(a[0] / 3, a[1] / 2), a[2] / 2);
    a[0] -= w * 3;
    a[1] -= w * 2;
    a[2] -= w * 2;
    int curr = 7 * w;
    for (int j = i; a[ind[j]] > 0; j = (j + 1) % 7) {
      a[ind[j]]--;
      curr++;
    }
    if (curr > best) best = curr;
  }
  cout << best << "\n";
  return 0;
}
