// Test.cpp : Hey the name doesn't matter does it.

#include <iostream>
using std::cin;
using std::cout;
using std::endl;

bool checkValid(const int SCORESc, const int SCORES[], const int score, const int i = 0) {
	int remainder = score % SCORES[i];
	if (remainder == 0) return true;
	if (i < SCORESc - 1) {
		while (remainder <= score) {
			if (checkValid(SCORESc, SCORES, remainder, i + 1)) return true;
			remainder += SCORES[i];
		}
	}
	return false;
}

int main() {
	int input;
	cin >> input;

	// suppose this line can be changed to include any game
	// also, suppose the list is sorted
	const int SCORES[4] = { 3, 6, 7, 8 };

	if (checkValid(sizeof(SCORES) / sizeof(SCORES[0]), SCORES, input)) {
		cout << "Valid Score" << endl;
	} else {
		cout << "Invalid Score" << endl;
	}

	return 0;
}