#include <bits/stdc++.h>
using namespace std;
int main() {
  iostream::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int a[3], b[3] = {3, 2, 2}, m1;
  cin >> a[0] >> a[1] >> a[2];
  string s = "abcacba";
  long long int c[3], m = INT_MAX, s1 = 0;
  for (long long int i = 0; i < 3; i++) {
    c[i] = a[i] / b[i];
    m = min(m, c[i]);
  }
  if (c[0] == m) {
    m1 = 0;
    s1 += c[0] * 7;
    for (long long int j = 0; j < 7; j++) {
      c[0] = a[0] % b[0];
      c[1] = a[1] - m * b[1];
      c[2] = a[2] - m * b[2];
      long long int cur = j, m2 = 0;
      while (c[0] >= 0 && c[1] >= 0 && c[2] >= 0) {
        if (s[cur % 7] == 'a')
          c[0]--;
        else if (s[cur % 7] == 'b')
          c[1]--;
        else
          c[2]--;
        cur++;
        m2++;
      }
      m2--;
      m1 = max(m1, m2);
    }
  } else if (c[1] == m) {
    m1 = 0;
    s1 += c[1] * 7;
    for (long long int j = 0; j < 7; j++) {
      c[1] = a[1] % b[1];
      c[0] = a[0] - m * b[0];
      c[2] = a[2] - m * b[2];
      long long int cur = j, m2 = 0;
      while (c[0] >= 0 && c[1] >= 0 && c[2] >= 0) {
        if (s[cur % 7] == 'a')
          c[0]--;
        else if (s[cur % 7] == 'b')
          c[1]--;
        else
          c[2]--;
        cur++;
        m2++;
      }
      m2--;
      m1 = max(m1, m2);
    }
  } else if (c[2] == m) {
    m1 = 0;
    s1 += c[2] * 7;
    for (long long int j = 0; j < 7; j++) {
      c[2] = a[2] % b[2];
      c[1] = a[1] - m * b[1];
      c[0] = a[0] - m * b[0];
      long long int cur = j, m2 = 0;
      while (c[0] >= 0 && c[1] >= 0 && c[2] >= 0) {
        if (s[cur % 7] == 'a')
          c[0]--;
        else if (s[cur % 7] == 'b')
          c[1]--;
        else
          c[2]--;
        cur++;
        m2++;
      }
      m2--;
      m1 = max(m1, m2);
    }
  }
  s1 += m1;
  cout << s1;
  return 0;
}
