#include<iostream>
using namespace std;
int main(){
    int a=10;
    int b=20;
    while (b!=0){
        a,b=b,a%b;
        
    }
    cout<<a;
}