#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[4];
  string line = "0120210012021";
  int days;
  while (cin >> a[0] >> a[1] >> a[2]) {
    days = min(a[0] / 3, min(a[1] / 2, a[2] / 2));
    a[0] -= days * 3, a[1] -= days * 2, a[2] -= days * 2;
    days = days * 7;
    int add = 0, total = 0;
    int b[4];
    for (int i = 0; i < 7; i++) {
      b[0] = a[0];
      b[1] = a[1];
      b[2] = a[2];
      total = 0;
      for (int j = i; j < line.length(); j++) {
        b[line[j] - '0']--;
        if (b[line[j] - '0'] < 0) break;
        total++;
      }
      add = max(add, total);
    }
    days += add;
    cout << days << '\n';
  }
  return 0;
}
