#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int v[10], dia[10];
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int minn;
  minn = a / 3;
  minn = min(minn, c / 2);
  minn = min(minn, b / 2);
  int tot = minn * 7;
  a -= minn * 3;
  b -= minn * 2;
  c -= minn * 2;
  v[0] = a;
  v[1] = b;
  v[2] = c;
  dia[0] = dia[3] = dia[6] = 0;
  dia[1] = dia[5] = 1;
  dia[2] = dia[4] = 2;
  int maxx = 0;
  for (int i = 0; i < 7; ++i) {
    v[0] = a;
    v[1] = b;
    v[2] = c;
    int auxt = tot;
    for (int j = 0; j < 7; j++) {
      if (v[dia[(i + j) % 7]] > 0)
        auxt++, v[dia[(i + j) % 7]]--;
      else
        break;
    }
    maxx = max(maxx, auxt);
  }
  cout << maxx << endl;
}
