#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
int main() {
  int ff, rr, cc;
  cin >> ff >> rr >> cc;
  int m = min(ff / 3, min(rr / 2, cc / 2));
  ff -= 3 * m, rr -= 2 * m, cc -= 2 * m;
  m *= 7;
  if (m == 0) {
    int ma = 0;
    string s = "frcfcrffrcfcrf";
    for (int j = 0; j < 7; j++) {
      int mm = 0;
      int f = ff, r = rr, c = cc;
      for (int i = j; i < j + 7; i++) {
        if (s[i] == 'f') {
          if (f)
            f--, mm++;
          else
            break;
        } else if (s[i] == 'r') {
          if (r)
            r--, mm++;
          else
            break;
        } else {
          if (c)
            c--, mm++;
          else
            break;
        }
      }
      ma = max(mm, ma);
    }
    cout << ma << endl;
    return 0;
  }
  string s = "frcfcrffrcfcrf";
  int ma = 0;
  for (int j = 0; j < 7; j++) {
    int mm = 0;
    int f = ff, r = rr, c = cc;
    for (int i = j; i < j + 7; i++) {
      if (s[i] == 'f') {
        if (f)
          f--, mm++;
        else
          break;
      } else if (s[i] == 'r') {
        if (r)
          r--, mm++;
        else
          break;
      } else {
        if (c)
          c--, mm++;
        else
          break;
      }
    }
    for (int i = j + 6; i >= j; i--) {
      if (s[i] == 'f') {
        if (f)
          f--, mm++;
        else
          break;
      } else if (s[i] == 'r') {
        if (r)
          r--, mm++;
        else
          break;
      } else {
        if (c)
          c--, mm++;
        else
          break;
      }
    }
    ma = max(mm, ma);
  }
  cout << m + ma << endl;
  return 0;
}
