#include <bits/stdc++.h>   using namespace std;   int main() {     int n, k;     cin >> n >> k;     int i = 1;     while ((n * i) % 10 != k && (n * i) % 10 != 0) {       i++;     }     cout << i << endl;     return 0;   }   