#include<bits/stdc++.h>
using namespace std;
int main(){
	int yue=17;
	while((yue+7)%11!=0){
		yue+=12;
    }
    cout<<yue;
	return 0;
}

